[Haskell-cafe] newbe question

2005-09-27 Thread feucht
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 --

Re: [Haskell-cafe] newbe question

2005-09-27 Thread Thomas Davie
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:

Re: [Haskell-cafe] newbe question

2005-09-27 Thread Wolfgang Jeltsch
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

Re: [Haskell-cafe] newbe question

2005-09-27 Thread feucht
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.

Re: [Haskell-cafe] newbe question

2005-09-27 Thread Thomas Davie
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

Re: [Haskell-cafe] Help wanted: Lazy multiway zipper with mismached intervals

2005-09-27 Thread Rene de Visser
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

[Haskell-cafe] Neural networks and optimization in Haskell

2005-09-27 Thread Joel Reymont
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

[Haskell-cafe] XMLParse module

2005-09-27 Thread Huong Nguyen
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

Re: [Haskell-cafe] newbe question

2005-09-27 Thread Glynn Clements
[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

Re: [Haskell-cafe] newbe question

2005-09-27 Thread feucht
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