Safe Haskell | None |
---|---|
Language | Haskell2010 |
Helpers for converting between lhs and hs files.
Synopsis
- data Section
- data Block = Block Section [Text]
- data Format
- bird :: Parser Block
- normal :: Parser (Maybe (Section, Section), [Text])
- parseHs :: [Text] -> [Block]
- printHs :: [Block] -> [Text]
- parseLhs :: [Text] -> [Block]
- printLhs :: [Block] -> [Text]
- parse :: Format -> [Text] -> [Block]
- print :: Format -> [Block] -> [Text]
- lhs2hs :: FilePath -> IO ()
- hs2lhs :: FilePath -> IO ()
Documentation
Type of file section
A native section block.
normal :: Parser (Maybe (Section, Section), [Text]) Source #
Parse a .hs
Normal code (.hs) is parsed where lines that are continuation of a section (neither contain clues as to whether code or comment) are output as Nothing, and the clues as to what the current and next section are is encoded as Just (current, next).