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

GHC 8.8 checklist #356

Closed
6 tasks done
RyanGlScott opened this issue Aug 6, 2018 · 3 comments · Fixed by #392
Closed
6 tasks done

GHC 8.8 checklist #356

RyanGlScott opened this issue Aug 6, 2018 · 3 comments · Fixed by #392

Comments

@RyanGlScott
Copy link
Collaborator

RyanGlScott commented Aug 6, 2018

This issue serves as a reminder to do certain things before we ship a new major release that supports GHC 8.8:

  • Bump the th-desugar submodule to incorporate changes from GHC 8.8 support th-desugar#105.

  • singletons is completely borked at the moment on GHC HEAD due to Can't build singletons on GHC HEAD post-"Remove decideKindGeneralisationPlan" #357. Figure out how to work around this.

  • Adapt to the MonadFail proposal.

    • When we require GHC 8.8 or later to build, we should remove qualified imports to Control.Monad.Fail, as they will no longer be necessary due to MonadFail being exported by the Prelude.
  • Now that ! and . can be parsed as type operators, we should remove the special-casing for (!) and (.). (See Note [Special cases for (.) and (!)].)

  • We can now rewrite ApplyTyCon:

    type family ApplyTyCon :: (k1 -> k2) -> (k1 ~> unmatchable_fun) where
    ApplyTyCon = (ApplyTyConAux2 :: (k1 -> k2 -> k3) -> (k1 ~> unmatchable_fun))
    ApplyTyCon = (ApplyTyConAux1 :: (k1 -> k2) -> (k1 ~> k2))

    To use visible kind application:

    type family ApplyTyCon :: (k1 -> k2) -> (k1 ~> unmatchable_fun) where
      ApplyTyCon @k1 @(k2 -> k3) @unmatchable_fun = ApplyTyConAux2
      ApplyTyCon @k1 @k2         @k2              = ApplyTyConAux1

    This change isn't strictly necessary, but it does make the right-hand sides a little less noisy.

@RyanGlScott
Copy link
Collaborator Author

The third bullet point (about the (!) and (.) type operators) won't be possible unless we can devise a fix for Trac #16339, which prevents us from replacing type (:.) with type (.) in singletons' export lists.

@int-index
Copy link
Contributor

The fix for #16339 has been merged to the ghc-8.8 branch.

RyanGlScott added a commit that referenced this issue Mar 24, 2019
`base-4.13` removes the `fail` method from the `Monad` class, leaving
it exclusively as a method of `MonadFail`, which is now re-exported
from the `Prelude`. This patch mirrors these changes on the
`singletons` side:

* `Fail`/`sFail` has been ripped out of `{P,S}Monad` in favor of new
  `{P,S}MonadFail` classes.
* A couple of functions in `singletons` needed to have their `Monad`
  constraints strengthened to `MonadFail` to mirror similar changes
  in `th-desugar`.

Addresses one bullet point of #356.

[ci skip]
RyanGlScott added a commit that referenced this issue Apr 1, 2019
`base-4.13` removes the `fail` method from the `Monad` class, leaving
it exclusively as a method of `MonadFail`, which is now re-exported
from the `Prelude`. This patch mirrors these changes on the
`singletons` side:

* `Fail`/`sFail` has been ripped out of `{P,S}Monad` in favor of new
  `{P,S}MonadFail` classes.
* A couple of functions in `singletons` needed to have their `Monad`
  constraints strengthened to `MonadFail` to mirror similar changes
  in `th-desugar`.

Addresses one bullet point of #356.
RyanGlScott added a commit that referenced this issue Apr 1, 2019
`base-4.13` removes the `fail` method from the `Monad` class, leaving
it exclusively as a method of `MonadFail`, which is now re-exported
from the `Prelude`. This patch mirrors these changes on the
`singletons` side:

* `Fail`/`sFail` has been ripped out of `{P,S}Monad` in favor of new
  `{P,S}MonadFail` classes.
* A couple of functions in `singletons` needed to have their `Monad`
  constraints strengthened to `MonadFail` to mirror similar changes
  in `th-desugar`.

Addresses one bullet point of #356.
RyanGlScott added a commit that referenced this issue Apr 29, 2019
This fixes #356 for good by checking off the last two tasks in its
description:

* Now that `MonadFail` is exported by the `Prelude`, we no longer
  need to import `Control.Monad.Fail`.
* We can use visible kind applications to simplify the presentation
  of `ApplyTyCon` to make it obvious how the two equations differ.
RyanGlScott added a commit that referenced this issue Apr 29, 2019
This fixes #356 for good by checking off the last two tasks in its
description:

* Now that `MonadFail` is exported by the `Prelude`, we no longer
  need to import `Control.Monad.Fail`.
* We can use visible kind applications to simplify the presentation
  of `ApplyTyCon` to make it obvious how the two equations differ.
@RyanGlScott
Copy link
Collaborator Author

With the merging of #393 and #400, I think every change that I wanted to get in before the next release has landed. Once GHC 8.8.1-rc1 is out, I think we can consider making an official Hackage release (unless anyone else thinks of some other change that deserves to make it in?).

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

Successfully merging a pull request may close this issue.

2 participants