ModuleAgda-2.7.0.1Haskell2010
Agda.Syntax.Translation.ReflectedToAbstract
- 2 types
- 1 class
- 15 values
- PackageAgda-2.7.0.1
- Exports18
- LanguageHaskell2010
- LicenceMIT
- SourceReflectedToAbstract.hs
type MonadReflectedToAbstract (m :: Type -> Type) = (MonadReader Vars m, MonadFresh NameId m, MonadError TCErr m, MonadTCEnv m, ReadTCState m, HasOptions m, HasBuiltins m, HasConstInfo m)Adds a new unique name to the current context.
NOTE: See chooseName in Agda.Syntax.Translation.AbstractToConcrete for similar logic.
NOTE: See freshConcreteName in Agda.Syntax.Scope.Monad also for similar logic.
Returns the name and type of the variable with the given de Bruijn index.
Associated types
type family AbsOfRef r
Methods
toAbstract :: MonadReflectedToAbstract m => r -> m (AbsOfRef r)
Instances14ToAbstract, …
ToAbstract LiteralDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract PatternDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract SortDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract TermDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract (QNamed Clause)Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract (List1 (QNamed Clause))Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract [QNamed Clause]Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract r => ToAbstract (Arg r)Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract r => ToAbstract (Abs r)Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract r => ToAbstract [Arg r]Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract (Expr, Elim)Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract (Expr, Elims)Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstractToAbstract r => ToAbstract (Named name r)Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstract(ToAbstract r, AbsOfRef r ~ Expr) => ToAbstract (Dom r, Name)Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ReflectedToAbstract
Translate reflected syntax to abstract, using the names from the current typechecking context.
Drop implicit arguments unless --show-implicit is on.
Check that all variables in the telescope are bound in the left-hand side. Since we check the telescope by attaching type annotations to the pattern variables there needs to be somewhere to put the annotation. Also, since the lhs is where the variables are actually bound, missing a binding for a variable that's used later in the telescope causes unbound variable panic (see #5044).