[Haskell-cafe] newbe question
Thomas Davie
tom.davie at gmail.com
Mon Sep 26 21:59:27 EDT 2005
On 27 Sep 2005, at 16:53, feucht at uni-koblenz.de wrote:
> On 27 Sep, Wolfgang Jeltsch wrote:
>
>
>
>> Hello,
>>
>> obviously, Hugs thinks that =- is a special operator. In Haskell
>> you have the
>> ability to define your own operators, so it would be possible to
>> define an
>> operator =-. I would suggest that you always put spaces around
>> the = in
>> declarations.
>>
>> Best wishes,
>> Wolfgang
>>
>>
>>
>
> Hello,
> thank you for fast reply.
> Ok, but what is the semantic of '=-' ? If it's an operator, it should
> have some impact (right term?).
>
The semantics are whatever you define them to be:
(=-) x y = doSomeFunkyStuff x y
Note that this also introduces problems with comments, a common
mistake people make is to not put a space after the -- comment
symbol, so they may end up with:
--| something
The compiler then interprets --| as an operator.
Bob
More information about the Haskell-Cafe
mailing list