As I understand it, both ways work.

> legSome ((LegGram g)::LegGram nt t s) ntV

If you compile this without ScopedTypeVariables extension, GHC will
remind you of it:

>    Illegal signature in pattern: LegGram nt t s
>        Use -XScopedTypeVariables to permit it

So another solution is to avoid the ugly redundancy is:

> legSome :: forall nt t s . LegGram nt t s -> nt -> Either String ([t], s)

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to