| To: glasgow-haskell-users@haskell.org
| Subject: Newtype deriving mixing up types
|
| Hello!
|
| I attach a program which I suspect demonstrates a bug in GHC. The important
| lines are:
|
|showType :: forall a . Expr a -> String
|showType (Lit _) = show (typeOf (undefined :: a))
|
|
Hello!
I attach a program which I suspect demonstrates a bug in GHC. The
important lines are:
showType :: forall a . Expr a -> String
showType (Lit _) = show (typeOf (undefined :: a))
test1 = showType (mk :: Expr BOOL) -- Prints "Bool" (wrong?)
test2 = showType (Lit mk :: Expr BOO