| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
FreeC.IR.Syntax.Pragma
Description
This module contains the definition of comments and pragmas for our intermediate language.
Synopsis
- data Comment
- = BlockComment { }
- | LineComment { }
- customPragmaPrefix :: String
- data Pragma = DecArgPragma {}
- prettyPragma :: Doc -> Doc
Documentation
A comment.
Comments are collected during parsing. However, the final AST
contains no comments. Pragmas (see DecArgPragma) are extracted
from comments by the front end.
A single-line comment (i.e., -- ...).
Constructors
| BlockComment | A multi-line comment (i.e., |
Fields | |
| LineComment | |
Fields | |
customPragmaPrefix :: String Source #
All custom pragmas of the compiler start with FreeC.
Data type for custom {-# FreeC ... #-} pragmas.
Constructors
| DecArgPragma | A |
Fields | |
prettyPragma :: Doc -> Doc Source #
Pretty prints a custom {-# FreeC ... #-} pragma with the given
contents.