My teacher in a haskell question asked to define tree as follows:
Beingthatsettingthiswaygivesthiserror:
Andinmanycornersoftheinternet,thehaskelltreetheydefineusingDataastheimagebelow:
So I would like to know if the teacher is correct in declaring tree this way because of the way he asked us to define the error in the compiler.