HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleAgda-2.7.0.1Haskell2010

Agda.Syntax.Abstract.Name

Abstract names carry unique identifiers and stuff.

  • 7 types
  • 3 classes
  • 37 values
  • PackageAgda-2.7.0.1
  • Exports47
  • LanguageHaskell2010
  • LicenceMIT
  • SourceName.hs
datadata Name
#

A name is a unique identifier and a suggestion for a concrete name. The concrete name contains the source location (if any) of the name. The source location of the binding site is also recorded.

Constructors

Instances39Eq, Ord, Show, NFData, Hashable, Pretty, …
datadata QName
#

Qualified names are non-empty lists of names. Equality on qualified names are just equality on the last name, i.e. the module part is just for show.

The SetRange instance for qualified names sets all individual ranges (including those of the module prefix) to the given one.

Instances43Eq, Ord, Show, NFData, Hashable, Pretty, …
  • Eq QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Ord QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Show QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • NFData QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Hashable QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Pretty QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • HasRange QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Subst QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Substitute.Class
  • PrettyTCM QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Pretty
  • ToConcrete RecordDirectivesDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.AbstractToConcrete
  • ToConcrete QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.AbstractToConcrete
  • Hilite RecordDirectivesDefined in Agda-2.7.0.1 · Agda.Interaction.Highlighting.FromAbstract

    Reengineered from the old Geniplate-implemented highlighting extraction. This was the old procedure:

    Traversal over declaration in abstract syntax that collects the following hiliting information:

    1. constructorInfo (highest prio)

    2.

    theRest

    (medium prio) 3.

    nameInfo

    (lowest prio)

    nameInfo: "All names mentioned in the syntax tree (not bound variables)." For each possibly ambiguous name (QName and AmbiguousQName) that not isExtendedLambdaName, do hiliteAmbiguous (used to be calledgenerate).

    constructorInfo (only when highlighting level == Full): "After the code has been type checked more information may be available for overloaded constructors, and generateConstructorInfo takes advantage of this information. Note, however, that highlighting for overloaded constructors is included also in nameInfo." This is not computed by recursion over the abstract syntax, but gets the constructor names stDisambiguatedNames that fall within the bounds of the current declaration.

    theRest: Bound variables, dotted patterns, record fields, module names, the "as" and "to" symbols and some other things.

    Here is a table what theRest used to collect:

    • -------------------------------------------------------------------- | A.Expr

    • -------------------------------------------------------------------- | getVarAndField (Expr) | A.Var | bound | getVarAndField | A.Rec(Update) | field | getExpr (Expr) | A.PatternSyn | patsyn | getExpr | A.Macro | macro

    • -------------------------------------------------------------------- | A.LetBinding

    • -------------------------------------------------------------------- | getLet | A.LetBind | bound | getLet | A.LetDeclaredVariable | bound

    • -------------------------------------------------------------------- | A.LamBinding

    • -------------------------------------------------------------------- | getLam | A.Binder under A.DomainFree | bound | getTyped | A.Binder under A.TBind | bound

    • -------------------------------------------------------------------- | A.Pattern'

    • -------------------------------------------------------------------- | getPattern(Syn) | A.VarP | bound | getPattern(Syn) | A.AsP | bound | getPattern(Syn) | A.DotP (not isProjP) | DottedPattern | getPattern(Syn) | A.RecP | field | getPattern(Syn) | A.PatternSynP | patsyn

    • -------------------------------------------------------------------- | A.Declaration

    • -------------------------------------------------------------------- | getFieldDecl | A.Field under A.RecDef | field | getPatSynArgs | A.PatternSynDef | bound | getPragma | A.BuiltinPragma... | keyword

    • -------------------------------------------------------------------- | A.NamedArg (polymorphism not supported in geniplate)

    • -------------------------------------------------------------------- | getNamedArg | NamedArg a | nameOf | getNamedArgE | NamedArg Exp | nameOf | getNamedArgP | NamedArg Pattern | nameOf | getNamedArgB | NamedArg BindName | nameOf | getNamedArgL | NamedArg LHSCore | nameOf

    | getModuleName | A.MName | mod | getModuleInfo | ModuleInfo | asName, (range of as,to) | getQuantityAttr | Common.Quantity | Symbol (if range)

  • Hilite QNameDefined in Agda-2.7.0.1 · Agda.Interaction.Highlighting.FromAbstract
  • KillRange QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • KillRange DefinitionsDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • KillRange RewriteRuleMapDefined in Agda-2.7.0.1 · Agda.TypeChecking.Monad.Base
  • SetRange QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • LensFixity' QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • LensFixity QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • LensInScope QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • NumHoles QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Sized QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • DeclaredNames RecordDirectivesDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Views
  • DeclaredNames KNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Views
  • ExprLike QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Views
  • TermLike QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Internal.Generic
  • NamesIn QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Internal.Names
  • SetBindingSite QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Scope.Base
  • LivesInCurrentModule QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract
  • Occurs QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.MetaVars.Occurs
  • FromTerm QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Primitive
  • PrimTerm QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Primitive
  • PrimType QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Primitive
  • ToTerm QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Primitive
  • InstantiateFull QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Reduce
  • EmbPrj QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Serialise.Instances.Common · orphan
  • Unquote QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Unquote
  • Collection KName NameKindBuilderDefined in Agda-2.7.0.1 · Agda.Interaction.Highlighting.Generate
  • Singleton KName NameKindBuilderDefined in Agda-2.7.0.1 · Agda.Interaction.Highlighting.Generate
  • Hilite (RenamingTo QName)Defined in Agda-2.7.0.1 · Agda.Interaction.Highlighting.FromAbstract
  • type SubstArg QName = TermDefined in Agda-2.7.0.1 · Agda.TypeChecking.Substitute.Class
  • type ConOfAbs RecordDirectives = [RecordDirective]Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.AbstractToConcrete
  • type ConOfAbs QName = QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.AbstractToConcrete
newtypenewtype ModuleName
#

A module name is just a qualified name.

The SetRange instance for module names sets all individual ranges to the given one.

Constructors

Instances22Eq, Ord, Show, NFData, Pretty, HasRange, …
classclass IsProjP a where
#

Check whether we are a projection pattern.

Instances6IsProjP
datadata Suffix
#

A name suffix

Constructors

Instances7Eq, Ord, Show, NFData, Pretty, KillRange, …
  • Eq SuffixDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Ord SuffixDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Show SuffixDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • NFData SuffixDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • Pretty SuffixDefined in Agda-2.7.0.1 · Agda.Syntax.Scope.Base · orphan
  • KillRange SuffixDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract · orphan
  • EmbPrj SuffixDefined in Agda-2.7.0.1 · Agda.TypeChecking.Serialise.Instances.Abstract · orphan
datadata QNamed a
#

Something preceeded by a qualified name.

Constructors

Instances16Functor, Foldable, Traversable, Show, Pretty, PrettyTCM, …
valuenextName :: FreshNameMode -> Name -> Name
#

Get the next version of the concrete name. For instance, nextName "x" = "x₁". The name must not be a NoName.

newtypenewtype AmbiguousQName
#

Ambiguous qualified names. Used for overloaded constructors.

Invariant: All the names in the list must have the same concrete, unqualified name. (This implies that they all have the same Range).

Constructors

Instances11Eq, Ord, Show, NFData, Pretty, HasRange, …

Sets the ranges of the individual names in the module name to match those of the corresponding concrete names. If the concrete names are fewer than the number of module name name parts, then the initial name parts get the range noRange.

C.D.E `withRangesOf` [A, B] returns C.D.E but with ranges set as follows:

  • C: noRange.

  • D: the range of A.

  • E: the range of B.

Precondition: The number of module name name parts has to be at least as large as the length of the list.

valueqnameToConcrete :: QName -> QName
#

Turn a qualified name into a concrete name. This should only be used as a fallback when looking up the right concrete name in the scope fails.

classclass IsNoName a where
#

Check whether a name is the empty name "_".

Methods

Instances8IsNoName, …
datadata FreshNameMode
#

Method by which to generate fresh unshadowed names.

Constructors