@@ -87,7 +87,8 @@ import System.IO
8787@
8888-}
8989moduleHeader :: IdrisParser [String]
90−moduleHeader = try (do reserved "module"
90+moduleHeader = try (do noDocCommentHere '|' "Modules cannot have documentation comments"
91+ reserved "module"
9192 i <- identifier
9293 option ';' (lchar ';')
9394 return (moduleName i))
@@ -1085,8 +1086,7 @@ parseImports fname input
10851086 = do i <- getIState
10861087 case parseString (runInnerParser (evalStateT imports i)) (Directed (UTF8.fromString fname) 0 0 0 0) input of
10871088 Failure err -> fail (show err)
1088− Success (x, i) -> do -- Discard state updates (there should be
1089− -- none anyway)
1089+ Success (x, i) -> do putIState i
10901090 return x
10911091 where imports :: IdrisParser (([String], [(String, Maybe String, FC)], Maybe Delta), IState)
10921092 imports = do whiteSpace
@@ -1125,6 +1125,7 @@ parseProg syn fname input mrk
11251125 putIState (i { errLine = Just (fc_line fc) }) -- Just errl })
11261126 return []
11271127 Success (x, i) -> do putIState i
1128+ reportParserWarnings
11281129 return $ collect x
11291130 where mainProg :: IdrisParser ([PDecl], IState)
11301131 mainProg = case mrk of
@@ -1200,6 +1201,7 @@ loadSource h lidr f
12001201 file_in <- runIO $ readFile f
12011202 file <- if lidr then tclift $ unlit f file_in else return file_in
12021203 (mname, imports, pos) <- parseImports f file
1204+ reportParserWarnings
12031205
12041206 -- process and check module aliases
12051207 let modAliases = M.fromList