On 2009 Jan 1, at 2:32, Max.cs wrote:
data Tree a = a | Branch (Tree a) (Tree a) deriving Show

but it seems not accpetable in haskell ?

You need a constructor in both legs of the type:

> data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving Show

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to