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

Hugo Pacheco hpacheco at gmail.com
Mon Mar 17 18:59:59 EDT 2008


I wonder if I am dealing with bugs in the type checker (replying to myself).

Curiously if I have

class FunctorF d where
   fmapF :: d -> (x -> y) -> F d x -> F d y

fff a = fmapF a id

it compiles correctly. If I infer the type signature of fff I get

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

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

I am repeating myself in
http://hackage.haskell.org/trac/ghc/ticket/2157#comment:6.

Sorry for the cascaded messages,
hugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080317/ac676c9c/attachment.htm


More information about the Haskell-Cafe mailing list