Take the 2-minute tour ×

So I'm trying to define my own tree type in haskell, but I'm getting an error.

data GTree a = Node a [Gtree a] deriving (Show, Read, Eq)  

results in

Not in scope: type constructor or class `Gtree'

Failed, modules loaded: none.

I'm not sure why my definition doesn't work while the one below will...


If anybody could explain this to me, it would be much appreciated. Thank you!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Your definition doesn't work because of the change in capitalization. See GTree vs Gtree.

share|improve this answer
haha oh wow, I don't know how I missed that... Maybe I need to take a little break or something. Thank you very much. –  Cody Bonney Feb 22 '11 at 1:14
add comment

Your Answer


