import public Data.List1
import public Language.Reflection.TTdata BindMode : TypeEq BindModedata UseSide : TypeEq UseSidedata DotReason : TypeNonLinearVar : DotReasonVarApplied : DotReasonNotConstructor : DotReasonErasedArg : DotReasonUserDotted : DotReasonUnknownDot : DotReasonUnderAppliedCon : DotReasonEq DotReasondata TTImp : TypeThe elaborator representation of an Idris term
All of these take a file context `FC` as their first argument
IVar : FC -> Name -> TTImpA variable reference, by name
IPi : FC -> Count -> PiInfo TTImp -> Maybe Name -> TTImp -> TTImp -> TTImpA function type, of the form `(mult binder : argTy) -> retTy`, with implicitness determined by `info`
ILam : FC -> Count -> PiInfo TTImp -> Maybe Name -> TTImp -> TTImp -> TTImpA lambda abstraction, of the form`\(mult binder : argTy) => retTy`, with implicitness determined by `info`
ILet : FC -> FC -> Count -> Name -> TTImp -> TTImp -> TTImp -> TTImpA let binding, of the form `let mult var : nTy = nVal in scope`
ICase : FC -> List FnOpt -> TTImp -> TTImp -> List Clause -> TTImpA case expression `case val : ty of clauses`
ILocal : FC -> List Decl -> TTImp -> TTImpA list of full declarations local to a term
IUpdate : FC -> List IFieldUpdate -> TTImp -> TTImp An update to a record value, `{ updates } val`IApp : FC -> TTImp -> TTImp -> TTImpA function application, `f x`
INamedApp : FC -> TTImp -> Name -> TTImp -> TTImp A named function application (for named parameters), e.g, `f {arg=x}`IAutoApp : FC -> TTImp -> TTImp -> TTImp An explicitly inserted auto implicit, `f @{x}`IWithApp : FC -> TTImp -> TTImp -> TTImpA `with` application `f | e`
ISearch : FC -> Nat -> TTImp`%search`
IAlternative : FC -> AltType -> List TTImp -> TTImpA list of potential desugarings of an ambiguous expression
The success conditions of typechecking is determined by AltType
IRewrite : FC -> TTImp -> TTImp -> TTImpA rewrite expression, `rewrite eq in exp`
IBindHere : FC -> BindMode -> TTImp -> TTImpAny implicit bindings in the scope should be bound here, using
the given binder
IBindVar : FC -> Name -> TTImpA name which should be implicitly bound
IAs : FC -> FC -> UseSide -> Name -> TTImp -> TTImpAn 'as' pattern, valid on the LHS of a clause only, `group@pat`
IMustUnify : FC -> DotReason -> TTImp -> TTImpA 'dot' pattern, i.e. one which must be equal to the given value
by unification, `.(e)`
IDelayed : FC -> LazyReason -> TTImp -> TTImpThe delay type, `Delay t`
IDelay : FC -> TTImp -> TTImpThe constructor of `Delay`, `delay t`
IForce : FC -> TTImp -> TTImp`force`
IQuote : FC -> TTImp -> TTImpQuasi-quotation of expression (`( ... ))
IQuoteName : FC -> Name -> TTImp Quasi-quotation of a name (`{ ... })IQuoteDecl : FC -> List Decl -> TTImpQuasi-quotation of a list of declarations (`[ ... ])
IUnquote : FC -> TTImp -> TTImpUnquote of an expression (~e)
IPrimVal : FC -> Constant -> TTImpA primitive value, such as an integer or string constant.
Also any primitive *type*, apart from `Type` itself
IType : FC -> TTImpThe type `Type`
IHole : FC -> String -> TTImpA named hole
Implicit : FC -> Bool -> TTImpAn implicit value, solved by unification, but which will also be
bound (either as a pattern variable or a type variable) if unsolved
at the end of elaborator.
Note that `Implicit False` is `?`, while `Implicit True` is `_`
IWithUnambigNames : FC -> List (FC, Name) -> TTImp -> TTImpAn explicit disambiguation directive `with names exp`
data IFieldUpdate : TypeA record field update
ISetField : List String -> TTImp -> IFieldUpdate`path := val`
ISetFieldApp : List String -> TTImp -> IFieldUpdate`path $= val`
Eq TTImp => Eq IFieldUpdateShow IFieldUpdatedata AltType : TypeFirstSuccess : AltTypeUnique : AltTypeUniqueDefault : TTImp -> AltTypedata FnOpt : TypeInline : FnOptNoInline : FnOptDeprecate : FnOptTCInline : FnOptHint : Bool -> FnOptFlag means the hint is a direct hint, not a function which might
find the result (e.g. chasing parent interface dictionaries)
GlobalHint : Bool -> FnOptA hint that is searched if direct hints search failed.
`%globalhint` if the argument is `True`, `%defaulthint` if `False`.
ExternFn : FnOptForeignFn : List TTImp -> FnOptDefined externally, takes a list of calling conventions
ForeignExport : List TTImp -> FnOptMark for export to a foreign language, takes a list of calling conventions
Invertible : FnOptassume safe to cancel arguments in unification
Totality : TotalReq -> FnOptMacro : FnOpt`%macro`
SpecArgs : List Name -> FnOptdata ITy : TypeA name with an associated type
data DataOpt : TypeSearchBy : List1 Name -> DataOptDetermining arguments
NoHints : DataOptDon't generate search hints for constructors
UniqueSearch : DataOptAuto implicit search must check result is unique
External : DataOptImplemented externally
NoNewtype : DataOptDon't apply newtype optimization
Eq DataOptdata Data : TypeMkData : FC -> Name -> Maybe TTImp -> List DataOpt -> List ITy -> DataMkLater : FC -> Name -> TTImp -> Datadata IField : Typedata Record : TypeMkRecord : FC -> Name -> List (Name, (Count, (PiInfo TTImp, TTImp))) -> List DataOpt -> Name -> List IField -> Recorddata WithFlag : TypeEq WithFlagdata Clause : TypeA clause in a function definition
PatClause : FC -> TTImp -> TTImp -> ClauseA simple pattern
WithClause : FC -> TTImp -> Count -> TTImp -> Maybe (Count, Name) -> List WithFlag -> List Clause -> ClauseA pattern with views
ImpossibleClause : FC -> TTImp -> ClauseAn impossible pattern
data WithDefault : (a : Type) -> a -> TypeDefaultedValue : WithDefault a defSpecifiedValue : a -> WithDefault a defEq a => Eq (WithDefault a def)Ord a => Ord (WithDefault a def)Show a => Show (WithDefault a def)specified : a -> WithDefault a defdefaulted : WithDefault a defcollapseDefault : WithDefault a def -> aonWithDefault : Lazy b -> (a -> b) -> WithDefault a def -> bdata IClaimData : TypeMkIClaimData : Count -> Visibility -> List FnOpt -> ITy -> IClaimDataEq TTImp => Eq IClaimDataShow IClaimDatadata Decl : TypeA top-level declaration
IClaim : WithFC IClaimData -> DeclA type ascription, `a : b`.
Called a claim because of Curry Howard, the statement `x : p` is equivalent to `x` is a proof of `p`.
IData : FC -> WithDefault Visibility Private -> Maybe TotalReq -> Data -> DeclA data type declaration
IDef : FC -> Name -> List Clause -> DeclA function body definition
IParameters : FC -> List (Name, (Count, (PiInfo TTImp, TTImp))) -> List Decl -> Decl A parameters block, e.g. `parameters {0 m : _} {auto _ : Monad m} (level : Nat)IRecord : FC -> Maybe String -> WithDefault Visibility Private -> Maybe TotalReq -> Record -> DeclA record declaration
@ ns Nested namespace
INamespace : FC -> Namespace -> List Decl -> DeclA namespace declaration, `namespace ns where decls`
ITransform : FC -> Name -> TTImp -> TTImp -> DeclA transformation rule declaration
IRunElabDecl : FC -> TTImp -> DeclA top-level elaborator script run, `%runElab`
ILog : Maybe (List String, Nat) -> DeclA directive for enabling compile-time logging, `%logging "<topic>" <level>`
IBuiltin : FC -> BuiltinType -> Name -> DeclA builtin declaration, `%builtin type name`
fromTTImp : TTImp -> TTImpfromDecls : List Decl -> List DeclgetFC : TTImp -> FCmapTopmostFC : (FC -> FC) -> TTImp -> TTImpdata Mode : TypeshowClause : Mode -> Clause -> Stringdata Argument : Type -> TypeArg : FC -> a -> Argument aNamedArg : FC -> Name -> a -> Argument aAutoArg : FC -> a -> Argument aisExplicit : Argument a -> Maybe (FC, a)fromPiInfo : FC -> PiInfo t -> Maybe Name -> a -> Maybe (Argument a)iApp : TTImp -> Argument TTImp -> TTImpunArg : Argument a -> aapply : TTImp -> List (Argument TTImp) -> TTImpWe often apply multiple arguments, this makes things simpler
data IsAppView : (FC, Name) -> SnocList (Argument TTImp) -> TTImp -> Typerecord AppView : TTImp -> TypeMkAppView : (head : (FC, Name)) -> (args : SnocList (Argument TTImp)) -> (0 _ : IsAppView head args t) -> AppView t.head : AppView t -> (FC, Name)head : AppView t -> (FC, Name).args : AppView t -> SnocList (Argument TTImp)args : AppView t -> SnocList (Argument TTImp)0 .isAppView : ({rec:0} : AppView t) -> IsAppView (head {rec:0}) (args {rec:0}) t0 isAppView : ({rec:0} : AppView t) -> IsAppView (head {rec:0}) (args {rec:0}) tappView : (t : TTImp) -> Maybe (AppView t)mapTTImp : (TTImp -> TTImp) -> TTImp -> TTImpmapPiInfo : (TTImp -> TTImp) -> PiInfo TTImp -> PiInfo TTImpmapClause : (TTImp -> TTImp) -> Clause -> ClausemapITy : (TTImp -> TTImp) -> ITy -> ITymapFnOpt : (TTImp -> TTImp) -> FnOpt -> FnOptmapData : (TTImp -> TTImp) -> Data -> DatamapIField : (TTImp -> TTImp) -> IField -> IFieldmapRecord : (TTImp -> TTImp) -> Record -> RecordmapDecl : (TTImp -> TTImp) -> Decl -> DeclmapIFieldUpdate : (TTImp -> TTImp) -> IFieldUpdate -> IFieldUpdatemapAltType : (TTImp -> TTImp) -> AltType -> AltTypemapATTImp' : Applicative m => (TTImp -> m TTImp -> m TTImp) -> TTImp -> m TTImpmapMPiInfo : Applicative m => (TTImp -> m TTImp -> m TTImp) -> PiInfo TTImp -> m (PiInfo TTImp)mapMClause : Applicative m => (TTImp -> m TTImp -> m TTImp) -> Clause -> m ClausemapMITy : Applicative m => (TTImp -> m TTImp -> m TTImp) -> ITy -> m ITymapMFnOpt : Applicative m => (TTImp -> m TTImp -> m TTImp) -> FnOpt -> m FnOptmapMData : Applicative m => (TTImp -> m TTImp -> m TTImp) -> Data -> m DatamapMIField : Applicative m => (TTImp -> m TTImp -> m TTImp) -> IField -> m IFieldmapMRecord : Applicative m => (TTImp -> m TTImp -> m TTImp) -> Record -> m RecordmapMDecl : Applicative m => (TTImp -> m TTImp -> m TTImp) -> Decl -> m DeclmapMIFieldUpdate : Applicative m => (TTImp -> m TTImp -> m TTImp) -> IFieldUpdate -> m IFieldUpdatemapMAltType : Applicative m => (TTImp -> m TTImp -> m TTImp) -> AltType -> m AltTypemapATTImp : Monad m => (m TTImp -> m TTImp) -> TTImp -> m TTImpmapMTTImp' : Monad m => (TTImp -> TTImp -> m TTImp) -> TTImp -> m TTImpmapMTTImp : Monad m => (TTImp -> m TTImp) -> TTImp -> m TTImp