a trap for the unwary

2000-12-01 Thread Malcolm Wallace
Today, I thought I had discovered a bug in ghc. Then I tried hbc and Hugs, and they also rejected my program with the same error. nhc98 alone accepts it without complaint. I looked up the Report, and it seems that the program is indeed incorrect. Quick quiz: without running this through a

Beginner: error when using multiple where stmts in hugs98

2000-12-01 Thread Wim-Jan Hilgenbos
Hi, I've been trying some examples in functional programming. Most things work fine, but I have trouble with expressions with 'where' clauses that define more then one local definition. (I work with hugs98 version september 1999 under Linux) For example: --[ Mydiff.hs

Re: a trap for the unwary

2000-12-01 Thread Jan-Willem Maessen
Malcolm Wallace writes: Quick quiz: without running this through a compiler, who can spot the mistake? :-) module Main where import Char f x = y where y | isSpace x = True y | otherwise = False-- ** The problem line? main = print (f 'x') Without running this

Re: a trap for the unwary

2000-12-01 Thread Malcolm Wallace
f x = y where y | isSpace x = True y | otherwise = False-- ** The problem line? Correct. Here y is a pattern binding, and multiple pattern bindings of the same variable are not permitted. f x = y () where y _ | isSpace x = True y _ | otherwise = False

Re: Beginner: error when using multiple where stmts in hugs98

2000-12-01 Thread Sebastian Schulz
Wim-Jan Hilgenbos wrote: Hi, I've been trying some examples in functional programming. Most things work fine, but I have trouble with expressions with 'where' clauses that define more then one local definition. (I work with hugs98 version september 1999 under Linux) For example:

old easter egg

2000-12-01 Thread Ronald Kuwawi
open text editor, type hash :: [Char] - Int hash = (foldl (+) 0) . (map ord) save as hash.hs load script, type: hash "MSDOS 6.000" or hash "SYSTEM 7.0" :-) Ronald ___ Haskell mailing list [EMAIL PROTECTED]

Re: old easter egg

2000-12-01 Thread Zhanyong Wan
Ronald Kuwawi wrote: open text editor, type hash :: [Char] - Int hash = (foldl (+) 0) . (map ord) save as hash.hs load script, type: hash "MSDOS 6.000" or hash "SYSTEM 7.0" or hash "HASKELL%98" :-) -- Zhanyong Wan ___ Haskell

The Haskell store is open ....

2000-12-01 Thread John Peterson
Head to http://www.cafepress.com/haskell for your holiday shopping. Thanks to Conal Elliott and Fritz Ruehr for their artwork. Conal's design was produced by Pan so this shirt is in fact powered by Haskell! I'll be glad to add more designs in the future. Once cafepress lets me put more than

Re: old easter egg

2000-12-01 Thread Jon Fairbairn
On Fri, 1 Dec 2000, Zhanyong Wan wrote: Ronald Kuwawi wrote: open text editor, type hash :: [Char] - Int hash = (foldl (+) 0) . (map ord) hash "HASKELL%98" hash "Haskell Ninety Eight !!" surely? -- Jón Fairbairn [EMAIL PROTECTED]

Re: old easter egg

2000-12-01 Thread Matthias Kilian
On Sat, 2 Dec 2000, Jon Fairbairn wrote: hash "HASKELL%98" hash "Haskell Ninety Eight !!" Here's the who;e truth: hash "Turing!" Kili -- Nunja! Wenn man erst einmal anfängt zu denken, dann ist es wie eine Sucht. Man kommt nicht mehr los davon. [WoKo in dag°, 28.11.2000]