Thanks, misleading error message this - the pattern guard extension
allows you to write qualifiers a la list comprehensions on the
left-hand side.
The front-end simply re-uses the implementation for list
comprehensions to do this, hence the error messages may still be a bit
skewed toward list comprehensions.
--Sigbjorn
Marc van Dongen writes:
> Hi there,
>
>
> ghc-2.0499999999999998, complains about list-comprehensions
> when compiling the following. There's probably some
> code-transformation going on here.
>
> > module Strange( strange ) where
>
> > strange :: (a,a,a) -> a
> > strange triple
> > | (first triple) == (fst triple) = first triple
>
> > first :: (a,b,c) -> a
> > first (a,b,c)
> > = a
>
> Stange.lhs:5: Couldn't match the type
> `PrelTup.(,,) tazz' against `PrelTup.(,)'
> Expected: `(tazz, tazz, tazz)'
> Inferred: `(tazz, tazN)'
> In a list-comprehension qualifer:
> `(first triple) PrelBase.== (PrelTup.fst triple)'
>
> Hope this helps,
>
>
>
>
> Marc van Dongen
> [EMAIL PROTECTED]