@@ -727,7 +727,7 @@ process fn (NewDefn decls) = do
727 getClauseName (PClause fc name whole with rhs whereBlock) = name
727 getClauseName (PClause fc name whole with rhs whereBlock) = name
728 getClauseName (PWith fc name whole with rhs whereBlock) = name
728 getClauseName (PWith fc name whole with rhs whereBlock) = name
729 defineName :: [PDecl] -> Idris ()
729 defineName :: [PDecl] -> Idris ()
730− defineName (tyDecl@(PTy docs argdocs syn fc opts name ty) : decls) = do
730+ defineName (tyDecl@(PTy docs argdocs syn fc opts name ty) : decls) = do
731 elabDecl EAll recinfo tyDecl
731 elabDecl EAll recinfo tyDecl
732 elabClauses recinfo fc opts name (concatMap getClauses decls)
732 elabClauses recinfo fc opts name (concatMap getClauses decls)
733 setReplDefined (Just name)
733 setReplDefined (Just name)
@@ -767,7 +767,7 @@ process fn (NewDefn decls) = do
767 fixClauses :: PDecl' t -> PDecl' t
767 fixClauses :: PDecl' t -> PDecl' t
768 fixClauses (PClauses fc opts _ css@(clause:cs)) =
768 fixClauses (PClauses fc opts _ css@(clause:cs)) =
769 PClauses fc opts (getClauseName clause) css
769 PClauses fc opts (getClauseName clause) css
770− fixClauses (PInstance syn fc constraints cls parms ty instName decls) =
770+ fixClauses (PInstance syn fc constraints cls parms ty instName decls) =
771 PInstance syn fc constraints cls parms ty instName (map fixClauses decls)
771 PInstance syn fc constraints cls parms ty instName (map fixClauses decls)
772 fixClauses decl = decl
772 fixClauses decl = decl
@@ -777,10 +777,10 @@ process fn (Undefine names) = undefine names
777 undefine [] = do
777 undefine [] = do
778 allDefined <- idris_repl_defs `fmap` get
778 allDefined <- idris_repl_defs `fmap` get
779 undefine' allDefined []
779 undefine' allDefined []
780− -- Keep track of which names you've removed so you can
780+ -- Keep track of which names you've removed so you can
781 -- print them out to the user afterward
781 -- print them out to the user afterward
782 undefine names = undefine' names []
782 undefine names = undefine' names []
783− undefine' [] list = do iRenderOutput $ printUndefinedNames list
783+ undefine' [] list = do iRenderOutput $ printUndefinedNames list
784 return ()
784 return ()
785 undefine' (n:names) already = do
785 undefine' (n:names) already = do
786 allDefined <- idris_repl_defs `fmap` get
786 allDefined <- idris_repl_defs `fmap` get
@@ -794,12 +794,12 @@ process fn (Undefine names) = undefine names
794 -- smart detection of exactly what kind of name we're undefining.
794 -- smart detection of exactly what kind of name we're undefining.
795 fputState (ctxt_lookup n . known_classes) Nothing
795 fputState (ctxt_lookup n . known_classes) Nothing
796 fmodifyState repl_definitions (delete n)
796 fmodifyState repl_definitions (delete n)
797− undefClosure n =
797+ undefClosure n =
798 do replDefs <- idris_repl_defs `fmap` get
798 do replDefs <- idris_repl_defs `fmap` get
799 callGraph <- whoCalls n
799 callGraph <- whoCalls n
800 let users = case lookup n callGraph of
800 let users = case lookup n callGraph of
801 Just ns -> nub ns
801 Just ns -> nub ns
802− Nothing -> fail ("Tried to undefine nonexistent name" ++ show n)
802+ Nothing -> fail ("Tried to undefine nonexistent name" ++ show n)
803 undefinedJustNow <- concat `fmap` mapM undefClosure users
803 undefinedJustNow <- concat `fmap` mapM undefClosure users
804 undefOne n
804 undefOne n
805 return (nub (n : undefinedJustNow))
805 return (nub (n : undefinedJustNow))
@@ -1341,6 +1341,8 @@ loadInputs inputs toline -- furthest line to read in input source files
1341 iWarn f $ pprintErr i e'
1341 iWarn f $ pprintErr i e'
1342 ProgramLineComment -> return () -- fail elsewhere
1342 ProgramLineComment -> return () -- fail elsewhere
1343 _ -> do setErrSpan emptyFC -- FIXME! Propagate it
1343 _ -> do setErrSpan emptyFC -- FIXME! Propagate it
1344+ -- Issue #1576 on the issue tracker.
1345+ -- https://github.com/idris-lang/Idris-dev/issues/1576
1344 iWarn emptyFC $ pprintErr i e)
1346 iWarn emptyFC $ pprintErr i e)
1345 where -- load all files, stop if any fail
1347 where -- load all files, stop if any fail
1346 tryLoad :: Bool -> [IFileType] -> Idris ()
1348 tryLoad :: Bool -> [IFileType] -> Idris ()
@@ -1362,6 +1364,9 @@ loadInputs inputs toline -- furthest line to read in input source files
1362 inew <- getIState
1364 inew <- getIState
1363 -- FIXME: Save these in IBC to avoid this hack! Need to
1365 -- FIXME: Save these in IBC to avoid this hack! Need to
1364 -- preserve it all from source inputs
1366 -- preserve it all from source inputs
1368+ -- Issue #1577 on the issue tracker.
1369+ -- https://github.com/idris-lang/Idris-dev/issues/1577
1365 let tidata = idris_tyinfodata inew
1370 let tidata = idris_tyinfodata inew
1366 let patdefs = idris_patdefs inew
1371 let patdefs = idris_patdefs inew
1367 ok <- noErrors
1372 ok <- noErrors