Type family bug?

Simon Peyton Jones simonpj at microsoft.com
Thu Jan 19 10:02:21 UTC 2017

This works

type family F (a :: k)

type instance F Maybe = Char
But this does not.  Surely it should?

type family F (a :: k) where -- = r  | r -> a where

  F Maybe = Char
The latter is rejected with

Foo.hs:6:5: error:

    * Expecting one more argument to `Maybe'

      Expected kind `k', but `Maybe' has kind `* -> *'

    * In the first argument of `F', namely `Maybe'

      In the type family declaration for `F'
If you agree I'll open a ticket.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20170119/42f00509/attachment.html>

More information about the ghc-devs mailing list