on master help sign in
Fix error reporting with mutual instances
10c257bEdwin Brady
src/Idris/ElabDecls.hs+4−2
@@ -2053,8 +2053,10 @@ elabDecl' what info d@(PClauses f o n ps)
2053 [] -> []
2053 [] -> []
2054 elabClauses info f (o ++ o') n ps
2054 elabClauses info f (o ++ o') n ps
2055elabDecl' what info (PMutual f ps)
2055elabDecl' what info (PMutual f ps)
2056+ = do case ps of
2057+ [p] -> elabDecl what info p
2056− = do mapM_ (elabDecl ETypes info) ps
2058+ _ -> do mapM_ (elabDecl ETypes info) ps
2057− mapM_ (elabDecl EDefns info) ps
2059+ mapM_ (elabDecl EDefns info) ps
2058 -- Do totality checking after entire mutual block
2060 -- Do totality checking after entire mutual block
2059 i <- get
2061 i <- get
2060 mapM_ (\n -> do logLvl 5 $ "Simplifying " ++ show n
2062 mapM_ (\n -> do logLvl 5 $ "Simplifying " ++ show n