haskell's prefix exprs
Christian Maeder
Christian.Maeder at dfki.de
Tue Jul 10 08:26:40 EDT 2007
Brian Hulley schrieb:
> Christian Maeder wrote:
>> (In fact, maybe for haskell' "$" could be changed to a keyword.)
>>
>
> Alternatively the # symbol could be removed from the pool of symbol
> chars and used to construct syntactic sugar so you could use
>
> f = id #$ \_ -> []
>
> to mean exactly
>
> f = id (\_ -> [])
For this case "#$" would not be needed when you could write:
f = id \ _ -> []
A keyword "#$", if one really wanted it, would make sense to replace the
infix application "id $ g x" with (the prefix expr) "id #$ g x", though.
Cheers Christian
More information about the Glasgow-haskell-users
mailing list