[Haskell-cafe] Existentially-quantified constructors: Hugs is
fine, GHC is not?
Einar Karttunen
ekarttun at cs.helsinki.fi
Wed May 10 09:13:20 EDT 2006
On 10.05 13:27, Otakar Smrz wrote:
> data ... = ... | forall b . FMap (b -> a) (Mapper s b)
>
> ... where FMap qf qc = stripFMap f q
>
> the GHC compiler as well as GHCi (6.4.2 and earlier) issue an error
>
> My brain just exploded.
> I can't handle pattern bindings for existentially-quantified
> constructors.
You can rewrite the code in a way that GHC accepts it. Just
avoid pattern binding your variables. I had the same problem
in HAppS code and needed to lift some code to the top
level to solve it.
- Einar Karttunen
More information about the Haskell-Cafe
mailing list