|
Sdf2HaskellUtils | Portability | portable | Stability | experimental | Maintainer | Joost Visser |
|
|
|
|
|
Description |
This module is part of Sdf2Haskell, a tool for generating Haskell
code from an SDF grammar. This module contains helper functions
for the conversion from Haskell to SDF. |
|
Synopsis |
|
|
|
Documentation |
|
type MkDecl = HsName -> String -> [Symbol] -> HsDecl |
Type synonym for functions that create a Haskell declaration
from a type name, a constructor name, and a list of Sdf symbols. |
|
production2decl :: MkDecl -> Production -> Maybe HsDecl |
Convert a context-free SDF production to a Haskell declaration. |
|
sort2hsname :: Symbol -> Maybe HsName |
Convert an Sdf sort into a Haskell name |
|
General utilities |
|
variables :: [String] |
Generate variables |
|
justFilter :: [Maybe a] -> [a] |
Remove Nothings, and keep values inside Justs. |
|
Produced by Haddock version 0.6 |