Return signatures in case expressions
Simon Marlow
simonmar at microsoft.com
Mon Aug 9 08:33:04 EDT 2004
On 04 August 2004 16:50, Volodimir Rudenko wrote:
> "Pattern type signatures, including the result part, can be
> used in case expressions:
> case e of { (x::a, y) :: a -> x } ".
>
> On the other hand, Subsection 7.4.10.4. 'Result type signatures' does
> not mention 'the case of case expressions' (sorry for pun).
That example isn't quite right. Extra parentheses are needed:
case e of { ((x::a, y) :: a) -> x }
I've fixed the docs.
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list