| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
BNFC.Backend.Haskell.CFtoAbstract
Synopsis
- cf2Abstract :: SharedOptions -> String -> CF -> Doc
- data DefCfg = DefCfg {
- sanitizeName :: String -> String
- hasType :: String
- arrow :: String
- lambda :: String
- cons :: String
- convTok :: String -> String
- convLitInt :: Exp -> Exp
- polymorphism :: [Base] -> [Base]
- definedRules' :: DefCfg -> Bool -> CF -> [Doc]
- definedRules :: Bool -> CF -> [Doc]
Documentation
Arguments
| :: SharedOptions | |
| -> String | Module name. |
| -> CF | Grammar. |
| -> Doc |
Create a Haskell module containing data type definitions for the abstract syntax.
Parametrize definedRules so that it can be used for Agda as well.
Constructors
| DefCfg | |
Fields
| |
definedRules' :: DefCfg -> Bool -> CF -> [Doc] Source #
Generate Haskell/Agda code for the defined constructors.
definedRules :: Bool -> CF -> [Doc] Source #
Generate Haskell code for the defined constructors.