idris-1.3.4: Functional Programming Language with Dependent Types
LicenseBSD3
MaintainerThe Idris Community.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Idris.Reflection

Description

 
Synopsis

Documentation

data RFunArg #

Constructors

RFunArg 

Fields

Instances

Instances details
Show RFunArg # 
Instance details

Defined in Idris.Reflection

Methods

showsPrec :: Int -> RFunArg -> ShowS

show :: RFunArg -> String

showList :: [RFunArg] -> ShowS

data RFunClause a #

Constructors

RMkFunClause a a 
RMkImpossibleClause a 

Instances

Instances details
Show a => Show (RFunClause a) # 
Instance details

Defined in Idris.Reflection

Methods

showsPrec :: Int -> RFunClause a -> ShowS

show :: RFunClause a -> String

showList :: [RFunClause a] -> ShowS

data RFunDefn a #

Constructors

RDefineFun Name [RFunClause a] 

Instances

Instances details
Show a => Show (RFunDefn a) # 
Instance details

Defined in Idris.Reflection

Methods

showsPrec :: Int -> RFunDefn a -> ShowS

show :: RFunDefn a -> String

showList :: [RFunDefn a] -> ShowS

data RTyDecl #

Constructors

RDeclare Name [RFunArg] Raw 

Instances

Instances details
Show RTyDecl # 
Instance details

Defined in Idris.Reflection

Methods

showsPrec :: Int -> RTyDecl -> ShowS

show :: RTyDecl -> String

showList :: [RTyDecl] -> ShowS

buildDatatypes :: IState -> Name -> [RDatatype] #

Build the reflected datatype definition(s) that correspond(s) to a provided unqualified name

buildFunDefns :: IState -> Name -> [RFunDefn Term] #

Build the reflected function definition(s) that correspond(s) to a provided unqualified name

fromTTMaybe :: Term -> Maybe Term #

getArgs :: [PArg] -> Raw -> ([RFunArg], Raw) #

Apply Idris's implicit info to get a signature. The [PArg] should come from a lookup in idris_implicits on IState.

mkList :: Raw -> [Raw] -> Raw #

rawList :: Raw -> [Raw] -> Raw #

rawPair :: (Raw, Raw) -> (Raw, Raw) -> Raw #

rawPairTy :: Raw -> Raw -> Raw #

reflect :: Term -> Raw #

Lift a term into its Language.Reflection.TT representation

reflectDatatype :: RDatatype -> Raw #

reflectEnv :: Env -> Raw #

Reflect the environment of a proof into a List (TTName, Binder TT)

reflectFC :: FC -> Raw #

Reflect a file context

reflectList :: Raw -> [Raw] -> Raw #

reflectRaw :: Raw -> Raw #

Lift a term into its Language.Reflection.Raw representation

reflectTTQuote :: [Name] -> Term -> Raw #

Create a reflected TT term, but leave refs to the provided name intact

reflectTTQuotePattern :: [Name] -> Term -> ElabD () #

Convert a reflected term to a more suitable form for pattern-matching. In particular, the less-interesting bits are elaborated to _ patterns. This happens to NameTypes, universe levels, names that are bound but not used, and the type annotation field of the P constructor.

reflm :: String -> Name #

Prefix a name with the Language.Reflection namespace

reify :: IState -> Term -> ElabD PTactic #

Reify tactics from their reflected representation

reifyBool :: Term -> ElabD Bool #

reifyList :: (Term -> ElabD a) -> Term -> ElabD [a] #

reifyRaw :: Term -> ElabD Raw #

Reify raw terms from their reflected representation

reifyReportPart :: Term -> Either Err ErrorReportPart #

Attempt to reify a report part from TT to the internal representation. Not in Idris or ElabD monads because it should be usable from either.

reifyTT :: Term -> ElabD Term #

Reify terms from their reflected representation

tacN :: String -> Name #

Prefix a name with the Language.Reflection.Elab namespace