idris-0.9.17: Functional Programming Language with Dependent Types

Safe HaskellNone
LanguageHaskell98

Idris.AbsSyntax

Contents

Synopsis

Documentation

forCodegen :: Codegen -> [(Codegen, a)] -> [a] Source

addFunctionErrorHandlers :: Name -> Name -> [Name] -> Idris () Source

Adds error handlers for a particular function and argument. If names are ambiguous, all matching handlers are updated.

withContext :: (IState -> Ctxt a) -> Name -> b -> (a -> Idris b) -> Idris b Source

withContext_ :: (IState -> Ctxt a) -> Name -> (a -> Idris ()) -> Idris () Source

runIO :: IO a -> Idris a Source

A version of liftIO that puts errors into the exception type of the Idris monad

addDeferred' Source

Arguments

:: NameType 
-> [(Name, (Int, Maybe Name, Type, Bool))]

The Name is the name being made into a metavar, the Int is the number of vars that are part of a putative proof context, the Maybe Name is the top-level function containing the new metavariable, the Type is its type, and the Bool is whether :p is allowed

-> Idris () 

Save information about a name that is not yet defined

isetLoadedRegion :: Idris () Source

Tell clients how much was parsed and loaded

expandParams :: (Name -> Name) -> [(Name, PTerm)] -> [Name] -> [Name] -> PTerm -> PTerm Source

expandParamsD :: Bool -> IState -> (Name -> Name) -> [(Name, PTerm)] -> [Name] -> PDecl -> PDecl Source

mapsnd :: (t -> t2) -> (t1, t) -> (t1, t2) Source

if it's just a type variable or concrete type, do it early (0)

if there's only type variables and injective constructors, do it next (1)

if there's a function type, next (2)

finally, everything else (3)

addImpl :: [Name] -> IState -> PTerm -> PTerm Source

Add the implicit arguments to applications in the term [Name] gives the names to always expend, even when under a binder of that name (this is to expand methods with implicit arguments in dependent type classes).

addImpl' :: Bool -> [Name] -> [Name] -> [Name] -> IState -> PTerm -> PTerm Source

aiFn :: Bool -> Bool -> Bool -> [Name] -> IState -> FC -> Name -> [[Text]] -> [PArg] -> Either Err PTerm Source

mkPApp :: FC -> Int -> PTerm -> [PArg] -> PTerm Source

data EitherErr a b Source

Constructors

LeftErr a 
RightOK b