GADT confusion

Alan & Kim Zimmerman alan.zimm at
Mon May 18 07:57:45 UTC 2015

Hi all

I am working on D836 and have the following test case

    data MaybeDefault v where
        SetTo4 :: forall v a. (( Eq v, Show v ) => v -> MaybeDefault v -> a
-> MaybeDefault [a])

GHC 7.10.1 regards the return type of SetTo4 as `MaybeDefault [a]`

The question is, due to the parens, is the return type not the whole RHS?

i.e. Similar to how in the signature

    map :: (a -> b) -> [a] -> [b]

the first paramater is a single function.

I am sure I am just confused here.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list