idris-0.9.18.1: 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

Functor SC' 
Binary SC 
TermSize SC 
Eq t => Eq (SC' t) 
Ord t => Ord (SC' t) 
Show t => Show (SC' t) 
NFData t => NFData (SC' t) 

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) 

Instances

data Phase Source

Constructors

CompileTime 
RunTime 

Instances

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