0
J'ai écrit du code dans haskell, et j'ai juste rencontré l'erreur ci-dessus. J'ai regardé ici pour la réponse, mais n'a pas pu trouver une réponse qui a arrangé mon problème.Erreur d'analyse (éventuellement indentation incorrecte ou parenthèses incompatibles) pour Haskell
makeCtordecls :: RandomGen g => String -> RandomState g [Ctordecl]
makeCtordecls tp = do
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
where
loop cnt
| cnt <= 0 = pure []
| otherwise = liftA2 (:) (f cnt) (loop (cnt - 1))
il dit qu'il ne parvient pas à analyser à "laisser listOfCtordecl ...."