YhcSource codeContentsIndex
Yhc.Core.Invariant
Synopsis
data Invariant
= NoCoreLet
| NoCorePos
| CoreAppFun
| CoreAppCon
| NoEmptyApp
| CoreCaseVar
| NoCaseDefault
| NoCaseDefaultOne
| NoCaseConst
| NoRecursiveLet
| NoCoreLam
| NoPartialAppPrim
| NoPartialAppCon
| ConsecutiveFuncs
| UniqueVarsFunc
| UniqueVarsCore
| FuncArityAtMostOne
| FuncArityExactlyOne
checkInvariant :: Invariant -> Core -> Bool
ensureInvariant :: Invariant -> Core -> Core
checkInvariants :: [Invariant] -> Core -> Bool
ensureInvariants :: [Invariant] -> Core -> Core
Documentation
data Invariant
Note, not all combinations are yet implemented - they crash at runtime. If you want any invariant, just email the list.
Constructors
NoCoreLetThe CoreLet constructor must not occur. Removal reduces sharing
NoCorePosThe CorePos constructor must not occur.
CoreAppFunAll CoreFun's must be enclosed in a CoreApp.
CoreAppConAll CoreCon's must be enclosed in a CoreApp.
NoEmptyAppAll CoreApp's must not have an empty argument list.
CoreCaseVarAll CoreCase's must be on a variable.
NoCaseDefaultAll constructor CoreCase's must not contain a default.
NoCaseDefaultOneAll constructor CoreCase defaults must represent at least two constructors.
NoCaseConstAll CoreCase's must be on constructors, not constants.
NoRecursiveLetCoreLet's must not be recursive. Removal reduces sharing in limited cases
NoCoreLamThe CoreLam constructor must not occur.
NoPartialAppPrimNo partial applications of CoreFun to a CorePrim
NoPartialAppConNo partial applications of CoreCon
ConsecutiveFuncsLow function numbers
UniqueVarsFuncUnique variables in each function
UniqueVarsCoreUnique variables in the whole program
FuncArityAtMostOneAll CoreApp CoreFun's must have at most one argument directly present
FuncArityExactlyOneAll CoreApp CoreFun's must have exactly one argument present
show/hide Instances
checkInvariant :: Invariant -> Core -> Bool
ensureInvariant :: Invariant -> Core -> Core
checkInvariants :: [Invariant] -> Core -> Bool
ensureInvariants :: [Invariant] -> Core -> Core
Produced by Haddock version 0.8