[Haskell-beginners] Odd behavior from WinHugs
Conrad Meyer
konrad at tylerc.org
Wed Jan 14 15:23:55 EST 2009
On Wednesday 14 January 2009 11:46:23 am Justin Bailey wrote:
> You have to capitalize your type names and data constructors:
>
> data MyTuple a b c d = My4Tuple a b c d
>
> | My3Tuple a b c
> | My2Tuple a b
> | My1Tuple a
>
> deriving (Show)
Also, I think (but by no means am I sure) that you should cut out 'a b c d'
from the left side, i.e.:
data MyTuple = My4Tuple a b c d
| My3Tuple a b c
| My2Tuple a b
| My1Tuple a
deriving (Show)
Someone please tell me if I am wrong :).
Regards,
--
Conrad Meyer <konrad at tylerc.org>
More information about the Beginners
mailing list