
I’m using GHCi in a Haskell version 7.10.2 and using this fragmente of coding: data ArvBinA t = Folha t | No Int (ArvBinA t) (ArvBinA t) deriving (Eq, Ord, Show) arvbina = No 4 (No 2 (Folha 14) (Folha 09)) (No 2 (Folha 19) (Folha 51)) tamArvBinA :: ArvBinA t -> Int tamArvBinA (Folha x) = 1 tamArvBinA (No n xt yt) = n rotula :: ArvBinA t -> ArvBinA t -> ArvBinA t rotula ae ad = No n ae ad where n = (tamArvBinA ae) + (tamArvBinA ad) listoArvBinA :: (Eq t) => [t] -> ArvBinA t listoArvBinA xs |m == 0 = Folha (head xs) |otherwise = rotula (listoArvBinA xse) (listoArvBinA xsd) where m = (length xs) `div` 2 (xse, xsd) = (take m xs, drop m xs) After compiling there is this message: parse error on input ‘=’. There is someone that he/she can help me? I think that’is na error by clause where and the offside rule, or so, but I’m not right of this. Thanks in advance for some help Francisco Vieira Enviado do Email do Windows