[Haskell-cafe] Non-existant existential?
Jim Apple
jbapple+haskell-cafe at gmail.com
Thu Sep 21 11:58:50 EDT 2006
Consider the following:
data SimpExist a = SimpExist (forall x . x -> a)
f :: SimpExist Bool
f = SimpExist (const True)
g = SimpExist id
What is the type of g? In a similar example, GHC tells me it is of
type SimpExist c. Yet, I can't unify it with any other SimpExist c'.
It seems to me that this is something like exists x . SimpExist x, and
is similar to:
data ExistWrap = forall a . ExistWrap (forall x . x -> a)
Jim
More information about the Haskell-Cafe
mailing list