ghci - parse error (possibly incorrect indentation or mismatched brackets) for Haskell -
i've been writing code in haskell, , ran error above. i've looked on here answer, couldn't find answer fixed problem.
makectordecls :: randomgen g => string -> randomstate g [ctordecl] makectordecls tp = rng <- (randomrs (5 :: int, 7 :: int) let listofctordecl = replicatecountm rng (makectordecl (tp)) return listofctordecl replicatecountm :: (applicative m) => int -> (int -> m a) -> m [a] replicatecountm cnt0 f = loop cnt0 loop cnt | cnt <= 0 = pure [] | otherwise = lifta2 (:) (f cnt) (loop (cnt - 1))
it saying failing parse @ "let listofctordecl...."
you forgot close paren on line:
rng <- (randomrs (5 :: int, 7 :: int)
it should be:
rng <- (randomrs (5 :: int, 7 :: int))
Comments
Post a Comment