uuagc

CommonTypes

# Documentation

module Options

type Blocks = Map BlockInfo [([String], Pos)]

type BlockInfo = (BlockKind, Maybe NontermIdent)

data BlockKind

Constructors

BlockImport |
BlockPragma |
BlockMain |
BlockOther |

Instances

Eq BlockKind |
Ord BlockKind |
Show BlockKind |

data Type

Constructors

Haskell String |
NT Identifier [String] Bool |
Self |

Instances

Eq Type |
Show Type |

data ComplexType

Constructors

List Type |
Tuple [(Identifier, Type)] |
Maybe Type |
Either Type Type |
Map Type Type |
IntMap Type |
OrdSet Type |
IntSet |

Instances

Show ComplexType |

type Attributes = Map Identifier Type

type TypeSyns = [(NontermIdent, ComplexType)]

type ParamMap = Map NontermIdent [Identifier]

type AttrNames = [(Identifier, Type, (String, String, String))]

type UseMap = Map NontermIdent (Map Identifier (String, String, String))

type PragmaMap = Map NontermIdent (Map ConstructorIdent (Set Identifier))

type AttrMap = Map NontermIdent (Map ConstructorIdent (Set (Identifier, Identifier)))

type UniqueMap = Map NontermIdent (Map ConstructorIdent (Map Identifier Identifier))

type Derivings = Map NontermIdent (Set Identifier)

type ClassContext = [(Identifier, [String])]

type ContextMap = Map NontermIdent ClassContext

type QuantMap = Map NontermIdent [String]

type Strings = [String]

type ConstructorIdent = Identifier

type AttrOrderMap = Map NontermIdent (Map ConstructorIdent (Set Dependency))

type VisitIdentifier = Int

type StateIdentifier = Int

data Dependency

Constructors

Dependency Occurrence Occurrence |

Instances

Eq Dependency |
Ord Dependency |
Show Dependency |

data Occurrence

Constructors

OccAttr Identifier Identifier |
OccRule Identifier |

Instances

Eq Occurrence |
Ord Occurrence |
Show Occurrence |

type AttrEnv = ([Identifier], [(Identifier, Identifier)])

idLateBindingAttr :: Identifier

lateBindingTypeNm :: String -> String

lateBindingFieldNm :: String -> String

lateBindingType :: String -> Type

lateSemNtLabel :: NontermIdent -> String

lateSemConLabel :: NontermIdent -> ConstructorIdent -> String

sdtype :: NontermIdent -> String

mkNtType :: Identifier -> [String] -> Type

cataname :: String -> Identifier -> String

conname :: Bool -> NontermIdent -> ConstructorIdent -> String

semname :: String -> NontermIdent -> ConstructorIdent -> String

recordFieldname :: NontermIdent -> ConstructorIdent -> Identifier -> String

lhsname :: Bool -> Identifier -> String

attrname :: Bool -> Identifier -> Identifier -> String

typeToAGString :: Type -> String

removeDeforested :: Type -> Type

typeToHaskellString :: Maybe NontermIdent -> [String] -> Type -> String

formatNonterminalToHaskell :: Bool -> String -> [String] -> String

ind :: String -> String

_NOCASE :: Identifier

hasPragma :: PragmaMap -> NontermIdent -> ConstructorIdent -> Identifier -> Bool

isNonterminal :: Type -> Bool

isSELFNonterminal :: Type -> Bool

extractNonterminal :: Type -> NontermIdent

nontermArgs :: Type -> [String]

deforestedNt :: Identifier -> Maybe Identifier

data StateCtx

Constructors

NoneVis |
OneVis !Int |
ManyVis |

Instances

Eq StateCtx |
Ord StateCtx |
Show StateCtx |

data ChildKind

Constructors

ChildSyntax |
ChildAttr |
ChildReplace Type |

Instances

Eq ChildKind |
Show ChildKind |

closeMap :: Ord a => Map a (Set a) -> Map a (Set a)

revDeps :: Ord a => Map a (Set a) -> Map a (Set a)

data HigherOrderInfo

Constructors

HigherOrderInfo |
Fields hoNtDeps :: Set NontermIdent hoNtRevDeps :: Set NontermIdent hoAcyclic :: Bool

data VisitKind

Constructors

VisitPure Bool |
VisitMonadic |

Instances

Eq VisitKind |
Ord VisitKind |
Show VisitKind |

isLazyKind :: VisitKind -> Bool

unionWithMappend :: (Monoid a, Ord k) => Map k a -> Map k a -> Map k a

data FormatMode

Constructors

FormatDo |
FormatLetDecl |
FormatLetLine |

Instances

Eq FormatMode |
Ord FormatMode |
Show FormatMode |