[Haskell-cafe] Existential quantification problem
Marco Túlio Gontijo e Silva
marcot at riseup.net
Thu Jul 10 13:53:20 EDT 2008
Hello,
how do I unbox a existential quantificated data type?
> {-# LANGUAGE ExistentialQuantification #-}
> data L a = forall l. L (l a)
> unboxL (L l) = l
is giving me, in GHC:
Inferred type is less polymorphic than expected
Quantified type variable `l' escapes
When checking an existential match that binds
l :: l t
The pattern(s) have type(s): L t
The body has type: l t
In the definition of `unboxL': unboxL (L l) = l
Thanks.
--
Marco Túlio Gontijo e Silva
Página: http://marcotmarcot.googlepages.com/
Blog: http://marcotmarcot.blogspot.com/
Correio: marcot at riseup.net
XMPP: marcot at jabber.org
IRC: marcot at irc.freenode.net
Telefone: 25151920
Celular: 98116720
Endereço:
Rua Turfa, 639/701
Prado 30410-370
Belo Horizonte/MG Brasil
More information about the Haskell-Cafe
mailing list