Hello!
I'm observing a strange type inference result in the program at the end of the
message.
term1 and term2 have the same definitions, except for a type annotation for
term2, but GHCi infers the following types:
*Main> :t term1
term1 :: Term ()
*Main> :t term2
term2 :: forall a. Term a
Could anyone please explain this?
Thank you,
/ Emil
-----------------------------------
data Term a = X
class Constructive term a | term -> a where
construct :: term -> Term a
instance Constructive (Term a) a where
construct = id
term1 = construct X
term2 :: Term a
term2 = construct X
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell