HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleAgda-2.7.0.1Haskell2010

Agda.Syntax.Concrete.Name

Names in the concrete syntax are just strings (or lists of strings for qualified names).

  • 6 types
  • 3 classes
  • 32 values
  • PackageAgda-2.7.0.1
  • Exports41
  • LanguageHaskell2010
  • LicenceMIT
  • SourceName.hs
datadata Name
#

A name is a non-empty list of alternating Ids and Holes. A normal name is represented by a singleton list, and operators are represented by a list with Holes where the arguments should go. For instance: [Hole,Id "+",Hole] is infix addition.

Equality and ordering on Names are defined to ignore range so same names in different locations are equal.

Instances27Eq, Ord, Show, NFData, IsNoName, HasRange, …
  • Eq NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name

    Define equality on Name to ignore range so same names in different locations are equal.

    Is there a reason not to do this? -Jeff

    No. But there are tons of reasons to do it. For instance, when using names as keys in maps you really don't want to have to get the range right to be able to do a lookup. -Ulf

  • Ord NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • Show NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • NFData AsNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete

    Ranges are not forced.

  • NFData NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name

    Ranges are not forced.

  • Pretty NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • IsNoName NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • HasRange AsNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete
  • HasRange NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • PrettyTCM NameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Pretty
  • SubstExpr NameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract
  • KillRange AsNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete
  • KillRange NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • SetRange NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • Underscore NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • LensInScope NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • NumHoles NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • ExprLike NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Generic
  • ToAbstract HoleContentDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract

    Content of interaction hole.

  • ToAbstract RewriteEqnDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract
  • ToQName NameDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract
  • EmbPrj NameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Serialise.Instances.Common · orphan
  • Pretty (ThingWithFixity Name)Defined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Pretty · orphan
  • ToAbstract (NewName Name)Defined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract
  • type AbsOfCon HoleContent = HoleContentDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract
  • type AbsOfCon RewriteEqn = RewriteEqn' () BindName Pattern ExprDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract
  • type AbsOfCon (NewName Name) = NameDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract
valueisOpenMixfix :: Name -> Bool
#

An open mixfix identifier is either prefix, infix, or suffix. That is to say: at least one of its extremities is a Hole

datadata NamePart
#

Mixfix identifiers are composed of words and holes, e.g. _+_ or if_then_else_ or [_/_].

Constructors

Instances9Eq, Ord, Show, Generic, NFData, Pretty, …
datadata QName
#

QName is a list of namespaces and the name of the constant. For the moment assumes namespaces are just Names and not explicitly applied modules. Also assumes namespaces are generative by just using derived equality. We will have to define an equality instance to non-generative namespaces (as well as having some sort of lookup table for namespace names).

Constructors

Instances16Eq, Ord, Show, NFData, Pretty, IsNoName, …
  • Eq QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • Ord QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • Show QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • NFData QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • Pretty QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • IsNoName QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • HasRange QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • PrettyTCM QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Pretty
  • KillRange QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • SetRange QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • Underscore QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • LensInScope QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • NumHoles QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • ExprLike QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Generic
  • ToQName QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Translation.ConcreteToAbstract
  • EmbPrj QNameDefined in Agda-2.7.0.1 · Agda.TypeChecking.Serialise.Instances.Common · orphan

Constructing simple Names.

3 declarations

Operations on Name and NamePart

12 declarations
classclass NumHoles a where
#

Number of holes in a Name (i.e., arity of a mixfix-operator).

Methods

Instances6NumHoles
  • NumHoles AmbiguousQNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name

    We can have an instance for ambiguous names as all share a common concrete name.

  • NumHoles NameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • NumHoles QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Abstract.Name
  • NumHoles NameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • NumHoles NamePartsDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name
  • NumHoles QNameDefined in Agda-2.7.0.1 · Agda.Syntax.Concrete.Name

Keeping track of which names are (not) in scope

2 declarations
datadata NameInScope
#
Instances7Eq, Show, NFData, ToJSON, EncodeTCM, LensInScope, …
classclass LensInScope a where
#
Instances5LensInScope

Generating fresh names

10 declarations
datadata FreshNameMode
#

Method by which to generate fresh unshadowed names.

Constructors

Lens for accessing and modifying the suffix of a name. The suffix of a NoName is always Nothing, and should not be changed.

valuenameRoot :: Name -> RawName
#

Get a raw version of the name with all suffixes removed. For instance, nameRoot "x₁₂₃" = "x".

Operations on qualified names

6 declarations

No name stuff

3 declarations
classclass IsNoName a where
#

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

Methods

Instances8IsNoName, …

Showing names

0 declarations

Printing names

0 declarations

Range instances

0 declarations

NFData instances

0 declarations