idris-1.2.0: Functional Programming Language with Dependent Types

LicenseBSD3
MaintainerThe Idris Community.
Safe HaskellNone
LanguageHaskell2010

Idris.Elab.Term

Description

 

Synopsis

Documentation

data ElabResult Source #

Constructors

ElabResult 

Fields

build :: IState -> ElabInfo -> ElabMode -> FnOpts -> Name -> PTerm -> ElabD ElabResult Source #

Using the elaborator, convert a term in raw syntax to a fully elaborated, typechecked term.

If building a pattern match, we convert undeclared variables from holes to pattern bindings.

Also find deferred names in the term and their types

buildTC :: IState -> ElabInfo -> ElabMode -> FnOpts -> Name -> [Name] -> PTerm -> ElabD ElabResult Source #

Build a term autogenerated as an interface method definition.

(Separate, so we don't go overboard resolving things that we don't know about yet on the LHS of a pattern def)

getUnmatchable :: Context -> Name -> [Bool] Source #

return whether arguments of the given constructor name can be matched on. If they're polymorphic, no, unless the type has beed made concrete by the time we get around to elaborating the argument.

data ElabCtxt Source #

Constructors

ElabCtxt 

Fields

elab :: IState -> ElabInfo -> ElabMode -> FnOpts -> Name -> PTerm -> ElabD () Source #

Returns the set of declarations we need to add to complete the definition (most likely case blocks to elaborate) as well as declarations resulting from user tactic scripts (%runElab)

findHighlight :: Name -> ElabD OutputAnnotation Source #

Use the local elab context to work out the highlighting for a name

trivialHoles' :: [Name] -> [(Name, Int)] -> IState -> ElabD () Source #

resolveTC' :: Bool -> Bool -> Int -> Term -> Name -> IState -> ElabD () Source #

case_ :: Bool -> Bool -> IState -> Name -> PTerm -> ElabD () Source #

metavarName :: [String] -> Name -> Name Source #

Compute the appropriate name for a top-level metavariable

processTacticDecls :: ElabInfo -> [RDeclInstructions] -> Idris () Source #

Do the left-over work after creating declarations in reflected elaborator scripts