idris-0.9.16: Functional Programming Language with Dependent Types

Safe HaskellNone
LanguageHaskell98

Idris.Core.Elaborate

Synopsis

Documentation

data Command Source

Constructors

Theorem Name Raw 
Eval Raw 
Quit 
Print Name 
Tac (Elab ()) 

data ElabState aux Source

Constructors

ES (ProofState, aux) String (Maybe (ElabState aux)) 

Instances

Show aux => Show (ElabState aux) 

type Elab' aux a = StateT (ElabState aux) TC a Source

type Elab a = Elab' () a Source

proofFail :: Elab' aux a -> Elab' aux a Source

explicit :: Name -> Elab' aux () Source

errAt :: String -> Name -> Elab' aux a -> Elab' aux a Source

erun :: FC -> Elab' aux a -> Elab' aux a Source

runElab :: aux -> Elab' aux a -> ProofState -> TC (a, ElabState aux) Source

execElab :: aux -> Elab' aux a -> ProofState -> TC (ElabState aux) Source

elaborate :: Context -> Name -> Type -> aux -> Elab' aux a -> TC (a, String) Source

updateAux :: (aux -> aux) -> Elab' aux () Source

Modify the auxiliary state

getAux :: Elab' aux aux Source

Get the auxiliary state

unifyLog :: Bool -> Elab' aux () Source

Set whether to show the unifier log

processTactic' :: Tactic -> Elab' aux () Source

Process a tactic within the current elaborator state

now_elaborating :: FC -> Name -> Name -> Elab' aux () Source

update_term :: (Term -> Term) -> Elab' aux () Source

elog :: String -> Elab' aux () Source

attack :: Elab' aux () Source

claim :: Name -> Raw -> Elab' aux () Source

exact :: Raw -> Elab' aux () Source

fill :: Raw -> Elab' aux () Source

match_fill :: Raw -> Elab' aux () Source

prep_fill :: Name -> [Name] -> Elab' aux () Source

solve :: Elab' aux () Source

regret :: Elab' aux () Source

compute :: Elab' aux () Source

eval_in :: Raw -> Elab' aux () Source

check_in :: Raw -> Elab' aux () Source

intro :: Maybe Name -> Elab' aux () Source

introTy :: Raw -> Maybe Name -> Elab' aux () Source

letbind :: Name -> Raw -> Raw -> Elab' aux () Source

expandLet :: Name -> Term -> Elab' aux () Source

rewrite :: Raw -> Elab' aux () Source

induction :: Raw -> Elab' aux () Source

casetac :: Raw -> Elab' aux () Source

equiv :: Raw -> Elab' aux () Source

patvar :: Name -> Elab' aux () Source

Turn the current hole into a pattern variable with the provided name, made unique if MN

patbind :: Name -> Elab' aux () Source

focus :: Name -> Elab' aux () Source

movelast :: Name -> Elab' aux () Source

dotterm :: Elab' aux () Source

zipHere :: Elab' aux () Source

Set the zipper in the proof state to point at the current sub term (This currently happens automatically, so this will have no effect...)

defer :: [Name] -> Name -> Elab' aux () Source

deferType :: Name -> Raw -> [Name] -> Elab' aux () Source

autoArg :: Name -> Elab' aux () Source

setinj :: Name -> Elab' aux () Source

undo :: Elab' aux () Source

prepare_apply Source

Arguments

:: Raw

The operation being applied

-> [Bool]

Whether arguments are implicit

-> Elab' aux [(Name, Name)]

The names of the arguments and their holes to be filled with elaborated argument values

Prepare to apply a function by creating holes to be filled by the arguments

apply :: Raw -> [(Bool, Int)] -> Elab' aux [(Name, Name)] Source

match_apply :: Raw -> [(Bool, Int)] -> Elab' aux [(Name, Name)] Source

apply' :: (Raw -> Elab' aux ()) -> Raw -> [(Bool, Int)] -> Elab' aux [(Name, Name)] Source

apply2 :: Raw -> [Maybe (Elab' aux ())] -> Elab' aux () Source

apply_elab :: Name -> [Maybe (Int, Elab' aux ())] -> Elab' aux () Source

simple_app :: Elab' aux () -> Elab' aux () -> String -> Elab' aux () Source

no_errors :: Elab' aux () -> Maybe Err -> Elab' aux () Source

try :: Elab' aux a -> Elab' aux a -> Elab' aux a Source

handleError :: (Err -> Bool) -> Elab' aux a -> Elab' aux a -> Bool -> Elab' aux a Source

try' :: Elab' aux a -> Elab' aux a -> Bool -> Elab' aux a Source

tryWhen :: Bool -> Elab' aux a -> Elab' aux a -> Elab' aux a Source

tryAll :: [(Elab' aux a, Name)] -> Elab' aux a Source

prunStateT :: Int -> Bool -> [a] -> StateT (ElabState t) TC t1 -> ElabState t -> TC ((t1, Int, Fails), ElabState t) Source

dumpprobs :: Show a => [(t, t1, t2, a)] -> [Char] Source