
Hi, I am very new to haskell and the program hugs and I am having problems using the wildcard operator _ Every time I try to use it in an definition it says something like the symbol /017 is not recognised. I am sure my defintions are correct as I tested it with an example defintion from Alan Thompsons craft of functional programming book. I am guessing that all the relevant modules have not been loaded properly. I have reinstalled hugs with full implementation and this has not helped. I am using a windows 98 PC. Any help suggestions? Or has anyone just got the wildcard definition which are could just paste into my scripts Many thanks --------------------------------- Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

Am Dienstag, 13. April 2004 16:07 schrieb Paul Cosby:
Hi,
I am very new to haskell and the program hugs and I am having problems using the wildcard operator _
Every time I try to use it in an definition it says something like the symbol /017 is not recognised.
Are you sure that it says "/017"? Maybe, it says "\017" or "\17". If this is the case, it is because of a control character in your source file.
I am sure my defintions are correct as I tested it with an example defintion from Alan Thompsons craft of functional programming book.
Could you post an example to this list?
I am guessing that all the relevant modules have not been loaded properly.
I doubt that this is the reason.
I have reinstalled hugs with full implementation and this has not helped. I am using a windows 98 PC.
Any help suggestions? Or has anyone just got the wildcard definition which are could just paste into my scripts
Try, for example, the following: isZero :: Integer -> Bool isZero 0 = True isZero _ = False It works with my installation of Hugs.
Many thanks
Your welcome. Wolfgang

Paul Cosby
Every time I try to use [underscore] in an definition it says something like the symbol /017 is not recognised
Could that be \017, i.e. octal 17 (defined in ASCII as SI, whatever that may be)?
Any help suggestions?
Wild guess: Are your files using the same character set as your Haskell system is expecting? I know Windows pulls some occasional stunts with the character set (and occasionally lies about it), but I wasn't aware that it affected underscore. -kzm -- If I haven't seen further, it is by standing in the footprints of giants

On 2004-04-13 at 18:52+0200 Ketil Malde wrote:
Paul Cosby
writes: Every time I try to use [underscore] in an definition it says something like the symbol /017 is not recognised
Could that be \017, i.e. octal 17 (defined in ASCII as SI, whatever that may be)?
SI is Shift In, if I remember correctly, not that the operation of devices like Flexowriters is of any relevance. However, I'd guess that it's hexadecimal 17, because ord '_' `rem` 16 == 15 == 0x17. So for some reason it's talking about the botom four bits of '_'!
Any help suggestions?
Wild guess: Are your files using the same character set as your Haskell system is expecting? I know Windows pulls some occasional stunts with the character set (and occasionally lies about it), but I wasn't aware that it affected underscore.
Windows is a mystery to me, however. My guess would be something translating from one page of a character table to another. What locale are you in? Jón -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk

Jon Fairbairn
On 2004-04-13 at 18:52+0200 Ketil Malde wrote:
Paul Cosby
writes: Every time I try to use [underscore] in an definition it says something like the symbol /017 is not recognised
Could that be \017, i.e. octal 17 (defined in ASCII as SI, whatever that may be)?
SI is Shift In, if I remember correctly, not that the operation of devices like Flexowriters is of any relevance. However, I'd guess that it's hexadecimal 17, because ord '_' `rem` 16 == 15 == 0x17. So for some reason it's talking about the botom four bits of '_'!
ITYM octal - underscore is character 95 = 0x5F = 0137, so the bottom four bits are 0xF = 017. Perhaps you're typing Ctrl-_ instead of Shift-_? (long shot) --KW 8-)
participants (5)
-
Jon Fairbairn
-
Keith Wansbrough
-
Ketil Malde
-
Paul Cosby
-
Wolfgang Jeltsch