idris-1.3.4: Functional Programming Language with Dependent Types

License | BSD3
Maintainer | The Idris Community.
Safe Haskell | None
Language | Haskell2010

Idris.Inliner

Description

Synopsis

- inlineDef :: IState -> [([Name], Term, Term)] -> [([Name], Term, Term)]
- inlineTerm :: IState -> Term -> Term

# Documentation

inlineDef :: IState -> [([Name], Term, Term)] -> [([Name], Term, Term)] #

inlineTerm :: IState -> Term -> Term #

Inlining is either top level (i.e. not in a function arg) or argument level

For each application in a term: * Check if the function is inlinable (Dictionaries are inlinable in an argument, not otherwise) - If so, try inlining without reducing its arguments + If successful, then continue on the result (top level) + If not, reduce the arguments (argument level) and try again - If not, inline all the arguments (top level)