diff --git a/compiler/Docs.hs b/compiler/Docs.hs index 2345ea2..c7b3ce2 100644 --- a/compiler/Docs.hs +++ b/compiler/Docs.hs @@ -65,7 +65,8 @@ docComment :: IParser String docComment = do try (string "{-|") contents <- closeComment - return $ dropWhile (==' ') (init (init contents)) + let reversed = dropWhile (`elem` " \n\r") . drop 2 $ reverse contents + return $ dropWhile (==' ') (reverse reversed) moduleDocs = do (names,exports) <- anyThen moduleDef