idris-0.10.3: Functional Programming Language with Dependent Types

Safe HaskellNone
LanguageHaskell98

Idris.Core.CaseTree

Synopsis

Documentation

data CaseDef Source

Constructors

CaseDef [Name] !SC [Term] 

Instances

type SC = SC' Term Source

data SC' t Source

Constructors

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

Instances

data CaseAlt' t Source

Constructors

ConCase Name Int [Name] !(SC' t) 
FnCase Name [Name] !(SC' t)

reflection function

ConstCase Const !(SC' t) 
SucCase Name !(SC' t) 
DefaultCase !(SC' t) 

data Phase Source

Constructors

CompileTime 
RunTime 

simpleCase :: Bool -> SC -> Bool -> Phase -> FC -> [Int] -> [Type] -> [([Name], Term, Term)] -> ErasureInfo -> TC CaseDef Source

small :: Name -> [Name] -> SC -> Bool 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

substSC :: Name -> Name -> SC -> SC Source

mkForce :: Name -> Name -> SC -> SC Source