List comprehensions

2003-01-30 Thread Rijk J. C. van Haaften
Hello, Recently, I came accross this expression: [ x + y | x - xs | y - ys ] As far as I can see (Haskell Report), this is not allowed by the haskell 98 standard. So I assume it to be an ex- tension. Where can I find information about this? Thanks, Rijk

Re: List comprehensions

2003-01-30 Thread Rijk J. C. van Haaften
* Rijk J. C. van Haaften [EMAIL PROTECTED] [2003-01-30 11:41 +0100]: Recently, I came accross this expression: [ x + y | x - xs | y - ys ] ^ Put a comma ',' here. That's something totally different. Two examples: 1. Comma [ x + y | x - [1,2], y

RE: 3 `\x y - x + y` 4 `\x y - x + y` 5: Wrong version pasted

2002-08-22 Thread Rijk J. C. van Haaften
I pasted the wrong version into the mail. This is the final one: module InfixFunction where infixl 0 $- infixr 0 $+ -- for left-associative functions ($) :: a - (a - b) - b ($) x f = f x -- for right-associative functions ($) :: a - (a - b) - b ($) x f = f x example1 :: Int example1 = --

Re: Binary search tree

2002-04-29 Thread Rijk J. C. van Haaften
Hi everybody, I studied haskell this semester at the university and I was required to implement a binary search tree in haskell. I would appreciate if anyone could send me an example code of this data structure. Just read a standard textbook. Some useful course notes by Jeroen Fokker are

Re: ANNOUNCE: Object I/O released

2002-04-09 Thread Rijk J. C. van Haaften
The quick reference still gives problems. I managed to download the quick reference. Get it at http://www.students.cs.uu.nl/people/rjchaaft/ObjectIO/objectio-ref.zip This is a very temporarily available service, so if anyone has a suitable server (again, cvs.haskell.org?), please take over

Re: ANNOUNCE: Object I/O released

2002-04-08 Thread Rijk J. C. van Haaften
Hello all, Peter Achten and Arjan van IJzendoorn wrote: I ... unfortunately could not open the .zip files and Peter asked Could you check the formats of these files? After having tried to download the file a few times, I believe the problem is not in the zip file format, but download failure.

Re: Typo: Hugs Bug ! it was +

2002-03-22 Thread Rijk J. C. van Haaften
Ahn Ki-yung wrote: Prelude f 1 where f x = x : f x [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ,1,1,{Interrupted!} Prelude f 1 where f x = x + f x -- Immediate (!) crash Indeed, I could reproduce this on my

Re: Hugs Bug !

2002-03-21 Thread Rijk J. C. van Haaften
but in windows 2000 Then suddnly interpreter fails and the red (X) popup window pops up. hugs.exe - application programm error unknown software exception (0xc000fd) ... blabla Are you sure you have the very very very latest download? There have been some undocumented updates of the

Rectification Hugs bug

2002-03-07 Thread Rijk J. C. van Haaften
Dear all, After intensive investication of several people here at Utrecht University, these are the results 1. The very latest Hugs version doesn't have the bug 2. All before-december-2001 versions don't have the bug I were using a version downloaded some weeks ago. After installing the

Rectification Hugs bug

2002-03-07 Thread Rijk J. C. van Haaften
Dear all, After intensive investication of several people at Utrecht University, these are the results: 1. The very latest Hugs version doesn't have the bug 2. All before-december-2001 versions don't have the bug I were using a version downloaded some weeks ago. After installing the current

Bug in Hugs Dec 2001: type inferencer incorrect!

2002-03-06 Thread Rijk J. C. van Haaften
Hello everybody, Although I didn't manage to reproduce the bug with a minimal example, I think it is still important enough to tell you (and especially the Hugs writers and maintainers). Yesterday evening, I tried to add some correct (!) code (by-hand-verifyable; by GHC accepted; just using

Bug in Hugs Dec 2001: type inferencer incorrect!

2002-03-06 Thread Rijk J. C. van Haaften
Hello everybody, Although I didn't manage to reproduce the bug with a minimal example, I think it is still important enough to tell you (and especially the Hugs writers and maintainers). Yesterday evening, I tried to add some correct (!) code (by-hand-verifyable; by GHC accepted; just using

Why is this function type-correct

2002-03-04 Thread Rijk J. C. van Haaften
Hello, Recently, I wrote a function similar to x :: a x = x 42 which is type-correct (Hugs, Ghc, THIH). Still, from the expression it is clear that the type shoud have a function type. The definition x :: a - b x = x 42 is equally well accepted, though I can't see why this type would be

Why is this function type-correct

2002-03-04 Thread Rijk J. C. van Haaften
Hello, Recently, I wrote a function similar to x :: a x = x 42 which is type-correct (Hugs, Ghc, THIH). Still, from the expression it is clear that the type shoud have a function type. The definition x :: a - b x = x 42 is equally well accepted, though I can't see why this type would be

Re: Ground Up

2002-02-28 Thread Rijk J. C. van Haaften
Jerry wrote However, my problems are: * I still don't understand most of the codes I found, like the various haskell libraries Practice is the only answer to this problem, as Keith Wansbrough says. * I still have no clue of most (ok, almost all) of what is being discussed in this mailing

Re: Help

2002-02-25 Thread Rijk J. C. van Haaften
You probably want to do something like this: main = do { contents - input twoboxes.dat return (control (parser contents)) } At 11:53 25-02-02 -0300, Juan M. Duran wrote: Hi, I'm writting a small parser in Haskell and, when it is all done, I get the following problem:

ANNOUNCE: Haskell support for JCreator update

2002-02-13 Thread Rijk J . C . van Haaften
Dear reader, I'm pleased to announce the availability of a release of the Haskell module for JCreator. You can get it, as usual, at http://www.students.cs.uu.nl/people/rjchaaft/JCreator The previous update lacks the documentation tool, and is quite restrictive concerning the location of Hugs,

Re: Specifying Kinds of Types

2002-02-08 Thread Rijk J . C . van Haaften
Ashley Yakeley wrote: I'd like to be able to declare the kinds of new types and synonyms, because sometimes Haskell can't infer them. For instance: data CMap0 p q = MkCMap0; Without evidence, Haskell assumes that p and q have kind '*' (as per sec. 4.6), and therefore CMap0 has kind '* - *

Re: Problem with 'nested' pattern matching

2002-02-01 Thread Rijk J . C . van Haaften
carlos wrote: Hello. I'm having some trouble trying to understand exactly what's behind the rule for pattern-matching with data constructors. The code I'm having trouble with is similar to this: f (C p1 p2 (C2 p3 p4)) = ... f _ = False What happens is if f is called with (C p1 p2 (NOT_C2

RE: n+k patterns

2002-01-30 Thread Rijk J. C. van Haaften
At 03:27 30-01-02 -0800, Simon Peyton-Jones wrote: | hbc is on the Integral side, if that counts. :-) | Just because ghc doesn't follow the spec isn't a good reason | to change the spec. :-) I absolutely didn't say that! All I'm saying is * Two of the four impls have to change regardless * The