[Haskell-cafe] Re: Type parameters in type families

Ryan Ingram ryani.spam at gmail.com
Tue Mar 18 15:03:40 EDT 2008


On 3/17/08, Hugo Pacheco <hpacheco at gmail.com> wrote:
> On the other side, it fails to compile when this signature is explicit:
> fff :: forall d x. (FunctorF d) => d -> F d x -> F d x
> fff a = fmapF a id

Interestingly, this works when you also give a type signature to "id":

fff :: forall d x. (FunctorF d) => d -> F d x -> F d x
fff a = fmapF a (id :: x -> x)

compiles for me (ghc6.8.2).  There's probably a bug in the type
checker; inference is working with no type signatures, but checking
fails.


More information about the Haskell-Cafe mailing list