Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data CodeComment = CodeComment {}
- data CommentPos
- ppWithCommentsStyleModeParseMode :: Style -> PPHsMode -> ParseMode -> Module (Maybe CodeComment) -> (Module SrcSpanInfo, [Comment])
- ppWithCommentsStyleMode :: Style -> PPHsMode -> Module (Maybe CodeComment) -> (Module SrcSpanInfo, [Comment])
- ppWithCommentsMode :: PPHsMode -> Module (Maybe CodeComment) -> (Module SrcSpanInfo, [Comment])
- ppWithComments :: Module (Maybe CodeComment) -> (Module SrcSpanInfo, [Comment])
- preComment :: String -> Maybe CodeComment
- postComment :: String -> Maybe CodeComment
- secComment :: String -> Maybe CodeComment
Data types
data CodeComment Source #
Annotate AST with comments.
CodeComment | |
|
data CommentPos Source #
Where to place a comment, relative to an AST node
Generate source code
ppWithCommentsStyleModeParseMode :: Style -> PPHsMode -> ParseMode -> Module (Maybe CodeComment) -> (Module SrcSpanInfo, [Comment]) Source #
Run pretty print and parse to obtain SrcSpanInfo
,
then gradually insert comments.
ppWithCommentsStyleMode :: Style -> PPHsMode -> Module (Maybe CodeComment) -> (Module SrcSpanInfo, [Comment]) Source #
ppWithCommentsStyleModeParseMode
with default parse style
ppWithCommentsMode :: PPHsMode -> Module (Maybe CodeComment) -> (Module SrcSpanInfo, [Comment]) Source #
ppWithCommentsStyleMode
with default style
ppWithComments :: Module (Maybe CodeComment) -> (Module SrcSpanInfo, [Comment]) Source #
ppWithCommentsMode
with default mode
Convenience functions
preComment :: String -> Maybe CodeComment Source #
Add haddock-style comment above some definition
postComment :: String -> Maybe CodeComment Source #
Add haddock-style comment below some definition
secComment :: String -> Maybe CodeComment Source #
Add haddock-style section (*
),
use it on definitions in an export list.