
3 Jan
2012
3 Jan
'12
6:35 a.m.
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)