haskell - parse error in let binding: missing required 'in' -


i solving problem needed split full binary tree matching duble of binary tree , leaf tree, like:

splitftree :: (ftree b)  -> (btree a, ltree b) 

where

data ftree b = leaf b | no (ftree b) (ftree b) data btree = empty | node (btree a) (btree a) data ltree = tip | fork (ltree a) (ltree a) 

and solution next code:

splitftree :: (ftree b)  -> (btree a, ltree b) splitftree (leaf a) = ( node empty empty , tip ) splitftree (no e d) = let (b1,l1) = splitftree e                             (b2,l2) = splitftree d                          in  (node b1 b2 , fork l1 l2)  

while compiling ghci following error, not know how got wrong:

solucaoficha9.hs:89:25: parse error in let binding: missing required 'in' 

can me this?

i discovered answer since let , in statement must lined same tab column on code, space lining not enough.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -