I have to do some exercises on BST and I need to use this implementation for the tree:
data ( Ord a , Show a , Read a ) => BST a = Void | Node {
val :: a ,
left , right :: BST a
}
deriving ( Eq , Ord , Read , Show )
But the compiler gives me:
Illegal datatype context (use DatatypeContexts): (Ord a,
Show a,
Read a) =>
Can someone help me?