Here is my code and there are so many things wrong about it that i can't see. What is the problem? or what "are" the problems?? I get these errors for several lines:
- Data constructor not in scope. NBaum
- Couldn't match expected type [NBaum [Char]]' with actual type `NBaum [Char]'
- In the second argument of NKnoten', namely `(NBlatt "Io")'
In the sixth argument of `NBaum', namely
data NBaum a = NBlatt a | NKnoten a [NBaum a] deriving(Eq,Show) tree :: NBaum String tree = NBaum "Sonne" (NKnoten "Erde" (NBlatt "MOND" ) ) (NBlatt "Merkur" ) (NBlatt "Venus" ) (NKnoten "MARS" (NBlatt "PHOBOS" ) (NBlatt "DEIMOS" ) ) (NKnoten "JUPITER" (NBlatt "Io" ) (NBlatt "EUROPA" ) (NBlatt "GANYMED" ) (NBlatt "KALLISTO" ) )