[Haskell-cafe] WildCard question
Wolfgang Jeltsch
wolfgang at jeltsch.net
Tue Apr 13 17:16:52 EDT 2004
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
More information about the Haskell-Cafe
mailing list