GHCI parse bug?

Bryn Keller brk@jenkon.com
Wed, 16 Oct 2002 11:36:25 -0700


Ah, thanks.

Hal Daume III wrote:
> Yes, the spaces are necessary.  This is because of the maximal munch
> rule; it assumes that '->\' is an identifier.  In fact, you can define it
> as such:
> 
> Prelude> let (->\) a b = a + b
> Prelude> 5 ->\ 6
> 11
> Prelude>
> 
> You can of course write
> 
> Prelude> let f = \x y z -> x (map (+y) z)
> 
> if you wish.
> 
> --
> Hal Daume III
> 
>  "Computer science is no more about computers    | hdaume@isi.edu
>   than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
> 
> On Wed, 16 Oct 2002, Bryn Keller wrote:
> 
> 
>>Prelude> let f = \x->\y->\z->x (map (+ y) z)
>><interactive>:1: parse error on input `->\'
>>Prelude> let f = \x-> \y-> \z-> x (map (+ y) z)
>>Prelude>
>>
>>Are the spaces really necessary, or is this a bug?
>>
>>Thanks,
>>
>>Bryn
>>
>>_______________________________________________
>>Glasgow-haskell-users mailing list
>>Glasgow-haskell-users@haskell.org
>>http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>>

-- 
Bryn Keller
Sr. Software Engineer
Jenkon, Inc.
Vancouver, WA
360.256.4400
brk@jenkon.com
www.jenkon.com