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: [EMAIL PROTECTED]
XMPP: [EMAIL PROTECTED]
IRC: [EMAIL PROTECTED]
Telefone: 25151920
Celular: 98116720
Endereço:
 Rua Turfa, 639/701
 Prado 30410-370
 Belo Horizonte/MG Brasil

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to