Hi
i can not load program test1 into hugs, but test2 works.
Am i missing some special syntax?
greetings,
Philip
-- test1 --
foo :: Maybe Int - Int
foo Nothing =-1
foo (Just a)= a
-- test2 --
foo :: Maybe Int - Int
foo Nothing = -1
--
The reason is that you can define =- as on operator
so for example, in this (obfuscated) code:
(=-) x y = x * y
sq y = y =- y
Thus, in your code, you had an operator on the LHS of the definition,
and the interpreter baulked at it.
Bob
On 27 Sep 2005, at 10:34, [EMAIL PROTECTED] wrote:
Am Dienstag, 27. September 2005 11:34 schrieb [EMAIL PROTECTED]:
Hi
i can not load program test1 into hugs, but test2 works.
Am i missing some special syntax?
greetings,
Philip
-- test1 --
foo :: Maybe Int - Int
foo Nothing =-1
foo (Just a)= a
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.
On 27 Sep 2005, at 16:53, [EMAIL PROTECTED] 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
Many thanks to all for the replies
From: ChrisK [EMAIL PROTECTED]
Could the interval for element x of List xList overlap with more than
one element of another list? It does not matter too much, but is
something you did not clarify. In general, how may the intervals for
all the lists
Folks,
I got a project where I have a large number of variables and an
outcome and I need to figure out which 20% of the variables has the
largest effect on the outcome. Of course I also need to optimize the
20% of variables I end up with.
This sounds like a job for a neural network to
Hello all,
I am reading XMLParse module
http://www.germane-software.com/repositories/public/StatusReport/trunk/hxml-0.2/XMLParse.hs
But, I am not clear about the purpose of this module and the function of two functions:
parseInstance = unfoldr (pRun instanceItem) . pcdataModeparseDTD = foldl (\a
[EMAIL PROTECTED] wrote:
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
On 27 Sep, Glynn Clements wrote:
It isn't defined in the prelude or any of the standard libraries.
The point is that the Haskell tokeniser treats any consecutive
sequence of the symbols !#$%*+./=[EMAIL PROTECTED]|-~ as a single operator
token.
This occurs regardless of whether a
10 matches
Mail list logo