on master help sign in
Use a slightly different pretty printer for PDecls
ad81ad3Alyssa Carter
src/Idris/REPL.hs+3−1
@@ -669,7 +669,9 @@ process h fn (Eval t)
669 ihPrintTermWithType h tmDoc tyDoc
669 ihPrintTermWithType h tmDoc tyDoc
670
670
671
671
672+process h fn (NewDefn decls) = do
673+ logLvl 3 ("Defining names using these decls: " ++ show (showDecls verbosePPOption decls))
672−process h fn (NewDefn decls) = logLvl 3 ("Defining names using these decls: " ++ show namedGroups) >> mapM_ defineName namedGroups where
674+ mapM_ defineName namedGroups where
673 namedGroups = groupBy (\d1 d2 -> getName d1 == getName d2) decls
675 namedGroups = groupBy (\d1 d2 -> getName d1 == getName d2) decls
674 getName :: PDecl -> Maybe Name
676 getName :: PDecl -> Maybe Name
675 getName (PTy docs argdocs syn fc opts name ty) = Just name
677 getName (PTy docs argdocs syn fc opts name ty) = Just name
src/Idris/REPLParser.hs+1−1
@@ -55,7 +55,7 @@ pCmd = do P.whiteSpace; do cmd ["q", "quit"]; eof; return Quit
55 defn <- concat <$> many (P.decl defaultSyntax)
55 defn <- concat <$> many (P.decl defaultSyntax)
56 return (NewDefn defn)
56 return (NewDefn defn)
57 <|> do cmd ["unlet","undefine"]
57 <|> do cmd ["unlet","undefine"]
58− Undefine `fmap` many P.name
58+ Undefine `fmap` many P.name
59 <|> do cmd ["lto", "loadto"];
59 <|> do cmd ["lto", "loadto"];
60 toline <- P.natural
60 toline <- P.natural
61 f <- many anyChar;
61 f <- many anyChar;