Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data VarsInfo tyname name uni a = VarsInfo {
- termVarInfoMap ∷ UniqueMap TermUnique (VarInfo tyname name uni a)
- typeVarInfoMap ∷ UniqueMap TypeUnique (TyVarInfo tyname name uni a)
- lookupVarInfo ∷ HasUnique name TermUnique ⇒ name → VarsInfo tyname name uni a → Maybe (VarInfo tyname name uni a)
- lookupTyVarInfo ∷ HasUnique tyname TypeUnique ⇒ tyname → VarsInfo tyname name uni a → Maybe (TyVarInfo tyname name uni a)
- data TyVarInfo tyname name uni a
- = NormalTyVar
- | DatatypeTyVar (Datatype tyname name uni a)
- data VarInfo tyname name uni a
- = NormalVar Strictness (Type tyname uni a) (Maybe Arity)
- | DatatypeConstructor Int tyname
- | DatatypeMatcher tyname
- varInfoStrictness ∷ VarInfo tyname name uni a → Strictness
- varInfoArity ∷ HasUnique tyname TypeUnique ⇒ VarInfo tyname name uni a → VarsInfo tyname name uni a → Maybe Arity
- termVarInfo ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique) ⇒ Term tyname name uni fun a → VarsInfo tyname name uni a
- datatypeMatcherArity ∷ Datatype tyname uni fun a → Arity
- datatypeConstructorArity ∷ Int → Datatype tyname uni fun a → Maybe Arity
- bindingVarInfo ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique) ⇒ Binding tyname name uni fun a → VarsInfo tyname name uni a
- getConstructorArities ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique) ⇒ tyname → VarsInfo tyname name uni a → Maybe [Arity]
Documentation
data VarsInfo tyname name uni a Source #
Information about variables and type variables in the program.
VarsInfo | |
|
lookupVarInfo ∷ HasUnique name TermUnique ⇒ name → VarsInfo tyname name uni a → Maybe (VarInfo tyname name uni a) Source #
Lookup the VarInfo
for a name
.
lookupTyVarInfo ∷ HasUnique tyname TypeUnique ⇒ tyname → VarsInfo tyname name uni a → Maybe (TyVarInfo tyname name uni a) Source #
Lookup the TyVarInfo
for a tyname
.
data TyVarInfo tyname name uni a Source #
Information about a type variable in the program.
NormalTyVar | A normal type variable, which could be anything. |
DatatypeTyVar (Datatype tyname name uni a) | A type variable corresponding to a datatype. Tells us the number of type variables and the constructors. |
data VarInfo tyname name uni a Source #
NormalVar Strictness (Type tyname uni a) (Maybe Arity) | A normal term variable, which could be anything. Tells us if it is strictly evaluated, its type, and possibly its arity. |
DatatypeConstructor Int tyname | A term variable corresponding to a datatype constructor. Tells us the index of the constructor and the name of the datatype that owns it. |
DatatypeMatcher tyname | A term variable corresponding to a datatype matcher. Tells us the name of the datatype that owns it. |
varInfoStrictness ∷ VarInfo tyname name uni a → Strictness Source #
varInfoArity ∷ HasUnique tyname TypeUnique ⇒ VarInfo tyname name uni a → VarsInfo tyname name uni a → Maybe Arity Source #
termVarInfo ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique) ⇒ Term tyname name uni fun a → VarsInfo tyname name uni a Source #
datatypeMatcherArity ∷ Datatype tyname uni fun a → Arity Source #
bindingVarInfo ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique) ⇒ Binding tyname name uni fun a → VarsInfo tyname name uni a Source #
getConstructorArities ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique) ⇒ tyname → VarsInfo tyname name uni a → Maybe [Arity] Source #
Get the arities of the constructors for the given datatype name.