Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hpack for skeleton #225

Closed
wants to merge 1 commit into from
Closed

Use hpack for skeleton #225

wants to merge 1 commit into from

Conversation

kmicklas
Copy link
Collaborator

This removes the need to keep exposed-modules up to date.

@ElvishJerricco
Copy link
Collaborator

It looks like cabal will support globbing in an upcoming version, and it already has common stanzas. I think hpack should be avoided. It's a 100% unnecessary point of failure that adds confusion to the file hierarchy of the project.

@kmicklas
Copy link
Collaborator Author

@ElvishJerricco Whoa, I didn't realize Cabal finally supported that. One thing that still appears to be missing is having a common stanza included from an external file. That would be super useful, for example, for maintaining a set of default-extensions shared across the packages in the project.

@ElvishJerricco
Copy link
Collaborator

@kmicklas I'd consider that minor enough that it's not worth the tremendous risks of complicating the tooling. Plus I'm not a fan of default-extensions to begin with ;)

@kmicklas
Copy link
Collaborator Author

kmicklas commented Oct 2, 2018

@ElvishJerricco We'd like to use default-extensions to make it easier for beginners to use, not having to worry about understanding the risks of each and maintaining them per-file. In general I prefer to use it as well, as, for example, putting ScopedTypeVariables in every file is just needless verbosity. I leave the per-file declarations for "dangerous" extensions (e.g. UndecidableInstances, TemplateHaskell) which now stick out much more easily. I'm curious why you don't like this feature?

I'm also not convinced the tooling complexity is really an issue here since we have pretty deep control over the build infrastructure of an Obelisk project.

On the other hand, after testing I've discovered that sharing configuration across packages doesn't actually work since it will be outside the package root for the purposes of cabal2nix. (There may be a workaround for this but I'm closing this PR for the time being.)

@kmicklas kmicklas closed this Oct 2, 2018
@ElvishJerricco
Copy link
Collaborator

@kmicklas I don't like default-extensions because it means I can't visit a file and know what language I'm using. That said I'm not suggesting default-extensions should be avoided; it's just not my preference.

I would strongly suggest hpack be avoided though. It doesn't matter if it's the user or obelisk taking on the complexity; it's complexity nonetheless, so it adds points of failure that will be ever more opaque and surprising to the user. Using hpack is an easy way to buy build failures that are 100% avoidable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants