Thank you but
if I change the code like this:
data BinTree a = Node BinTree a BinTree a | EmptyBinTree deriving Show
b1 = Node 3 EmptyBinTree EmptyBinTree
Then I am get this error:
bintree.hs:1:23:
`BinTree' is not applied to enough type arguments
Expected kind `?', but `BinTree' has kind `k0 -> *'
In the type `BinTree'
In the definition of data constructor `Node'
In the data type declaration for `BinTree'
Failed, modules loaded: none.
From: Kyle Murphy <orclev@gmail.com>
To: Kak Dod <kak.dod2008@yahoo.com>
Cc: "beginners@haskell.org" <beginners@haskell.org>
Sent: Friday, 13 April 2012 4:38 PM
Subject: Re: [Haskell-beginners] error: Not in scope: data constructor `BinTree'
Your constructor is called Node, not BinTree.
data BinTree a = Node a (BinTree a) (BinTree a) | EmptyNode
b1 = Node 3 EmptyNode EmptyNode
-R. Kyle Murphy
Sent from my phone.