@@ -69,8 +69,10 @@ docComment = do
6969 return $ dropWhile (==' ') (reverse reversed)
7070
7171moduleDocs = do
72− (names,exports) <- anyThen moduleDef
73− anyThen (lookAhead (string "{-|"))
72+ optional freshLine
73+ (names,exports) <- moduleDef
74+ manyTill (string " " <|> newline <?> "more whitespace")
75+ (lookAhead (string "{-|") <?> "module documentation comment")
7476 structure <- docComment
7577 return (List.intercalate "." names, exports, structure)
7678