[Haskell] Problem with types.
Jared Updike
jupdike at gmail.com
Wed Aug 16 14:41:05 EDT 2006
haskell-cafe at haskell.org is usually a better venue for these sorts of
questions. People there love helping people learn Haskell.
> And when I try to load it to GHCi I get an error (there is also plenty of
> others but they look the same):
>
> couldn't match Int against t t1
This error occurs because you provided a bad type signature, confusing
yourself and triggering the type checker to correct you. Sometimes you
can write code and if it compiles you can run ghci and try :t
function and it will tell you the right type of the function.
You might read
http://haskell.org/haskellwiki/Introduction_to_IO
and
http://www.haskell.org/hawiki/ThatAnnoyingIoType
There are (strange) reasons Haskell is the (strange) way it is. With
patience (strange) things will make (strange) sense. Good luck!
Jared.
--
http://www.updike.org/~jared/
reverse ")-:"
More information about the Haskell
mailing list