Agda-2.5.2: A dependently typed functional programming language and proof assistant

Safe Haskell | None
Language | Haskell2010

Agda.Syntax.Info

Description

An info object contains additional information about a piece of abstract syntax that isn't part of the actual syntax. For instance, it might contain the source code position of an expression or the concrete syntax that an internal expression originates from.

Synopsis

- data MetaInfo = MetaInfo {
  - metaRange :: Range
  - metaScope :: ScopeInfo
  - metaNumber :: Maybe MetaId
  - metaNameSuggestion :: String
  }
- emptyMetaInfo :: MetaInfo
- newtype ExprInfo = ExprRange Range
- exprNoRange :: ExprInfo
- data ModuleInfo = ModuleInfo {
  - minfoRange :: Range
  - minfoAsTo :: Range
  - minfoAsName :: Maybe Name
  - minfoOpenShort :: Maybe OpenShortHand
  - minfoDirective :: Maybe ImportDirective
  }
- newtype LetInfo = LetRange Range
- data DefInfo = DefInfo {
  - defFixity :: Fixity'
  - defAccess :: Access
  - defAbstract :: IsAbstract
  - defInstance :: IsInstance
  - defMacro :: IsMacro
  - defInfo :: DeclInfo
  }
- mkDefInfo :: Name -> Fixity' -> Access -> IsAbstract -> Range -> DefInfo
- mkDefInfoInstance :: Name -> Fixity' -> Access -> IsAbstract -> IsInstance -> IsMacro -> Range -> DefInfo
- data DeclInfo = DeclInfo {
  - declName :: Name
  - declRange :: Range
  }
- data MutualInfo = MutualInfo {
  - mutualTermCheck :: TerminationCheck Name
  - mutualPositivityCheck :: PositivityCheck
  - mutualRange :: Range
  }
- newtype LHSInfo = LHSRange Range
- newtype PatInfo = PatRange Range
- patNoRange :: PatInfo
- data ConPatInfo = ConPatInfo {
  - patOrigin :: ConOrigin
  - patInfo :: PatInfo
  }

# Documentation

data MetaInfo #

Constructors

MetaInfo |
Fields metaRange :: Range metaScope :: ScopeInfo metaNumber :: Maybe MetaId metaNameSuggestion :: String

Instances

Eq MetaInfo # |
Methods (==) :: MetaInfo -> MetaInfo -> Bool # (/=) :: MetaInfo -> MetaInfo -> Bool #
Show MetaInfo # |
Methods showsPrec :: Int -> MetaInfo -> ShowS # show :: MetaInfo -> String # showList :: [MetaInfo] -> ShowS #
KillRange MetaInfo # |
Methods killRange :: KillRangeT MetaInfo #
HasRange MetaInfo # |
Methods getRange :: MetaInfo -> Range #

emptyMetaInfo :: MetaInfo #

newtype ExprInfo #

Constructors

ExprRange Range |

Instances

Eq ExprInfo # |
Methods (==) :: ExprInfo -> ExprInfo -> Bool # (/=) :: ExprInfo -> ExprInfo -> Bool #
Show ExprInfo # |
Methods showsPrec :: Int -> ExprInfo -> ShowS # show :: ExprInfo -> String # showList :: [ExprInfo] -> ShowS #
Null ExprInfo # |
Methods empty :: ExprInfo # null :: ExprInfo -> Bool #
KillRange ExprInfo # |
Methods killRange :: KillRangeT ExprInfo #
HasRange ExprInfo # |
Methods getRange :: ExprInfo -> Range #

exprNoRange :: ExprInfo #

data ModuleInfo #

Constructors

ModuleInfo |
Fields minfoRange :: Range minfoAsTo :: Range The range of the "as" and "to" keywords, if any. Retained for highlighting purposes. minfoAsName :: Maybe Name The "as" module name, if any. Retained for highlighting purposes. minfoOpenShort :: Maybe OpenShortHand minfoDirective :: Maybe ImportDirective Retained for `abstractToConcrete` of `ModuleMacro`.

Instances

Eq ModuleInfo # |
Methods (==) :: ModuleInfo -> ModuleInfo -> Bool # (/=) :: ModuleInfo -> ModuleInfo -> Bool #
(Show OpenShortHand, Show ImportDirective) => Show ModuleInfo # |
Methods showsPrec :: Int -> ModuleInfo -> ShowS # show :: ModuleInfo -> String # showList :: [ModuleInfo] -> ShowS #
KillRange ModuleInfo # |
Methods killRange :: KillRangeT ModuleInfo #
SetRange ModuleInfo # |
Methods setRange :: Range -> ModuleInfo -> ModuleInfo #
HasRange ModuleInfo # |
Methods getRange :: ModuleInfo -> Range #
UniverseBi Declaration ModuleInfo # |
Methods universeBi :: Declaration -> [ModuleInfo] #

newtype LetInfo #

Constructors

LetRange Range |

Instances

Eq LetInfo # |
Methods (==) :: LetInfo -> LetInfo -> Bool # (/=) :: LetInfo -> LetInfo -> Bool #
Show LetInfo # |
Methods showsPrec :: Int -> LetInfo -> ShowS # show :: LetInfo -> String # showList :: [LetInfo] -> ShowS #
Null LetInfo # |
Methods empty :: LetInfo # null :: LetInfo -> Bool #
KillRange LetInfo # |
Methods killRange :: KillRangeT LetInfo #
HasRange LetInfo # |
Methods getRange :: LetInfo -> Range #

data DefInfo #

Constructors

DefInfo |
Fields defFixity :: Fixity' defAccess :: Access defAbstract :: IsAbstract defInstance :: IsInstance defMacro :: IsMacro defInfo :: DeclInfo

Instances

Eq DefInfo # |
Methods (==) :: DefInfo -> DefInfo -> Bool # (/=) :: DefInfo -> DefInfo -> Bool #
Show DefInfo # |
Methods showsPrec :: Int -> DefInfo -> ShowS # show :: DefInfo -> String # showList :: [DefInfo] -> ShowS #
KillRange DefInfo # |
Methods killRange :: KillRangeT DefInfo #
SetRange DefInfo # |
Methods setRange :: Range -> DefInfo -> DefInfo #
HasRange DefInfo # |
Methods getRange :: DefInfo -> Range #

mkDefInfo :: Name -> Fixity' -> Access -> IsAbstract -> Range -> DefInfo #

mkDefInfoInstance :: Name -> Fixity' -> Access -> IsAbstract -> IsInstance -> IsMacro -> Range -> DefInfo #

Same as `mkDefInfo` but where we can also give the `IsInstance`

data DeclInfo #

Constructors

DeclInfo |
Fields declName :: Name declRange :: Range

Instances

Eq DeclInfo # |
Methods (==) :: DeclInfo -> DeclInfo -> Bool # (/=) :: DeclInfo -> DeclInfo -> Bool #
Show DeclInfo # |
Methods showsPrec :: Int -> DeclInfo -> ShowS # show :: DeclInfo -> String # showList :: [DeclInfo] -> ShowS #
KillRange DeclInfo # |
Methods killRange :: KillRangeT DeclInfo #
SetRange DeclInfo # |
Methods setRange :: Range -> DeclInfo -> DeclInfo #
HasRange DeclInfo # |
Methods getRange :: DeclInfo -> Range #

data MutualInfo #

Constructors

MutualInfo |
Fields mutualTermCheck :: TerminationCheck Name mutualPositivityCheck :: PositivityCheck mutualRange :: Range

Instances

Eq MutualInfo # |
Methods (==) :: MutualInfo -> MutualInfo -> Bool # (/=) :: MutualInfo -> MutualInfo -> Bool #
Show MutualInfo # |
Methods showsPrec :: Int -> MutualInfo -> ShowS # show :: MutualInfo -> String # showList :: [MutualInfo] -> ShowS #
Null MutualInfo # | Default value for `MutualInfo`.
Methods empty :: MutualInfo # null :: MutualInfo -> Bool #
KillRange MutualInfo # |
Methods killRange :: KillRangeT MutualInfo #
HasRange MutualInfo # |
Methods getRange :: MutualInfo -> Range #

newtype LHSInfo #

Constructors

LHSRange Range |

Instances

Eq LHSInfo # |
Methods (==) :: LHSInfo -> LHSInfo -> Bool # (/=) :: LHSInfo -> LHSInfo -> Bool #
Show LHSInfo # |
Methods showsPrec :: Int -> LHSInfo -> ShowS # show :: LHSInfo -> String # showList :: [LHSInfo] -> ShowS #
Null LHSInfo # |
Methods empty :: LHSInfo # null :: LHSInfo -> Bool #
KillRange LHSInfo # |
Methods killRange :: KillRangeT LHSInfo #
HasRange LHSInfo # |
Methods getRange :: LHSInfo -> Range #

newtype PatInfo #

For a general pattern we remember the source code position.

Constructors

PatRange Range |

Instances

Eq PatInfo # |
Methods (==) :: PatInfo -> PatInfo -> Bool # (/=) :: PatInfo -> PatInfo -> Bool #
Show PatInfo # |
Methods showsPrec :: Int -> PatInfo -> ShowS # show :: PatInfo -> String # showList :: [PatInfo] -> ShowS #
Null PatInfo # |
Methods empty :: PatInfo # null :: PatInfo -> Bool #
KillRange PatInfo # |
Methods killRange :: KillRangeT PatInfo #
HasRange PatInfo # |
Methods getRange :: PatInfo -> Range #

patNoRange :: PatInfo #

Empty range for patterns.

data ConPatInfo #

Constructor pattern info.

Constructors

ConPatInfo |
Fields patOrigin :: ConOrigin Does this pattern come form the eta-expansion of an implicit pattern? patInfo :: PatInfo

Instances

Eq ConPatInfo # |
Methods (==) :: ConPatInfo -> ConPatInfo -> Bool # (/=) :: ConPatInfo -> ConPatInfo -> Bool #
Show ConPatInfo # |
Methods showsPrec :: Int -> ConPatInfo -> ShowS # show :: ConPatInfo -> String # showList :: [ConPatInfo] -> ShowS #
KillRange ConPatInfo # |
Methods killRange :: KillRangeT ConPatInfo #
SetRange ConPatInfo # |
Methods setRange :: Range -> ConPatInfo -> ConPatInfo #
HasRange ConPatInfo # |
Methods getRange :: ConPatInfo -> Range #