Skip to content

Constraint vs *

I first noticed something was a bit odd with Constraint when chasing #11334 (closed). Consider this testcase (-O0 is sufficient),

import Data.Typeable

main = do
    print $ typeRep (Proxy :: Proxy Eq)
    print $ typeOf (Proxy :: Proxy Eq)

With ghc-8.0 this will produce,

Eq
Proxy (* -> *) Eq

Notice the second line; GHC seems to be claiming that Eq :: * -> *, which is clearly nonsense.

I believe this issue may be the cause of some of the testsuite failures that I'm seeing on #11011 (closed). Unfortunately I haven't the foggiest where this issue might originate.

See also

Edited by Simon Peyton Jones
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information