The majority of forums are now only available as archives, which means posting/editing is disabled.
The Anything and Everything forum is still open.
The Anything and Everything forum is still open.
haskell type classing
|
|||
|
Rank: ? (4)
Member #: 26601 |
Aight, I'm trying teach myself how to write my own classes in haskell and I came upon an error recently and cant seems to figure out how to fix it. Can anyone help???
My Script so far says: Code:
and when i run it hugs I get an error that says" "Hugs session for: C:\Program Files\Hugs98\lib\Prelude.hs C:\Documents and Settings\04044465\Desktop\lab2.hs Lab2> nullify 10 ERROR - Unresolved overloading *** Type : (Num a, Null a) => a *** Expression : nullify 10 " Now please do not link me to the tutorial on haskell.org, cuz i know what I'm doing I just can't figure this bit out. Please someone help........ |
||
|
|||
|
|||
|
Rank: ? (4)
Member #: 26601 |
actually u guys can forget abt that post I solved it
The code was right I just had to write "nullify 10::Int" in hugs rather than "nullify 10" however another question : what is the instance for lists: eg. "instance Null ???? where....." ???? - class for lists i dont know anyone can help?? |
||
|
Please login or register to post a reply.
