Safe Haskell | None |
---|---|
Language | Haskell98 |
- data CaseDef = CaseDef [Name] !SC [Term]
- type SC = SC' Term
- data SC' t
- = Case CaseType Name [CaseAlt' t]
- | ProjCase t [CaseAlt' t]
- | STerm !t
- | UnmatchedCase String
- | ImpossibleCase
- type CaseAlt = CaseAlt' Term
- data CaseAlt' t
- type ErasureInfo = Name -> [Int]
- data Phase
- type CaseTree = SC
- data CaseType
- simpleCase :: Bool -> SC -> Bool -> Phase -> FC -> [Int] -> [Type] -> [([Name], Term, Term)] -> ErasureInfo -> TC CaseDef
- small :: Name -> [Name] -> SC -> Bool
- namesUsed :: SC -> [Name]
- findCalls :: SC -> [Name] -> [(Name, [[Name]])]
- findUsedArgs :: SC -> [Name] -> [Name]
- substSC :: Name -> Name -> SC -> SC
- substAlt :: Name -> Name -> CaseAlt -> CaseAlt
- mkForce :: Name -> Name -> SC -> SC
Documentation
Case CaseType Name [CaseAlt' t] | invariant: lowest tags first |
ProjCase t [CaseAlt' t] | special case for projections/thunk-forcing before inspection |
STerm !t | |
UnmatchedCase String | error message |
ImpossibleCase | already checked to be impossible |
type ErasureInfo = Name -> [Int] Source
simpleCase :: Bool -> SC -> Bool -> Phase -> FC -> [Int] -> [Type] -> [([Name], Term, Term)] -> ErasureInfo -> TC CaseDef Source
findCalls :: SC -> [Name] -> [(Name, [[Name]])] Source
Return all called functions, and which arguments are used in each argument position for the call, in order to help reduce compilation time, and trace all unused arguments
findUsedArgs :: SC -> [Name] -> [Name] Source