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

Allow building with GHC 8.8 #380

Merged
merged 1 commit into from
Jan 21, 2019
Merged

Allow building with GHC 8.8 #380

merged 1 commit into from
Jan 21, 2019

Conversation

RyanGlScott
Copy link
Collaborator

@RyanGlScott RyanGlScott commented Jan 15, 2019

This makes some tweaks to allow building singletons with GHC 8.8:

Note that this does not yet drop compatibility with GHC 8.6 (I'll wait until a release candidate for 8.8 emerges), but this at least allows intrepid users to build singletons with 8.8 with fewer hassles.

This makes some tweaks to allow building `singletons` with GHC 8.8:

* As mentioned in
  #357 (comment),
  some local definitions now require explicit type signatures to
  compile due to changes in kind generalization brought about in
  GHC 8.8. I've added a lengthy section in `CHANGES.md` about this.
* In order to avoid more problems due to the aforementioned kind
  generalization changes, this patch introduces "the `id` hack"
  described in
  #357 (comment).
  This is carefully documented in
  `Note [The id hack; or, how singletons learned to stop worrying and
  avoid kind generalization]` in `Data.Singletons.Single`.

  As a consequence of all this, this patch fixes #357.
* It turns out that `promoteMethod` was accidentally passing the
  wrong method name to `promoteLetDecRHS`, causing the generated type
  family to have different names in its header and equations on GHC
  HEAD. Fortunately, this is easily fixed.
* Due to
  [GHC Trac #16133](https://ghc.haskell.org/trac/ghc/ticket/16133)
  being fixed, `singletons`-generated code now requires explicitly
  enabling the `TypeApplications` extension. (The generated code was
  always using `TypeApplications` under the hood, but it's only now
  that GHC is detecting it.)

Note that this does not yet drop compatibility with GHC 8.6 (I'll
wait until a release candidate for 8.8 emerges), but this at least
allows intrepid users to build `singletons` with 8.8 with fewer
hassles.
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.

Can't build singletons on GHC HEAD post-"Remove decideKindGeneralisationPlan"
1 participant