logo       

RE: Return signatures in case expressions: msg#00008

lang.haskell.glasgow.bugs

Subject: RE: Return signatures in case expressions

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise