| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Agda.Syntax.Position
Description
Position information for syntax. Crucial for giving good error messages.
Synopsis
- type Position = Position' SrcFile
- type PositionWithoutFile = Position' ()
- data Position' a = Pn {}
- type SrcFile = Maybe RangeFile
- data RangeFile = RangeFile {}
- mkRangeFile :: AbsolutePath -> Maybe (TopLevelModuleName' Range) -> RangeFile
- positionInvariant :: Position' a -> Bool
- startPos :: Maybe RangeFile -> Position
- startPos' :: a -> Position' a
- movePos :: Position' a -> Char -> Position' a
- movePosByString :: Foldable t => Position' a -> t Char -> Position' a
- backupPos :: Position' a -> Position' a
- type Interval = Interval' SrcFile
- type IntervalWithoutFile = Interval' ()
- data Interval' a = Interval a !PositionWithoutFile !PositionWithoutFile
- intervalInvariant :: Ord a => Interval' a -> Bool
- iStart :: Interval' a -> Position' a
- iEnd :: Interval' a -> Position' a
- posToInterval :: a -> PositionWithoutFile -> PositionWithoutFile -> Interval' a
- getIntervalFile :: Interval' a -> a
- iLength :: Interval' a -> Word32
- fuseIntervals :: IntervalWithoutFile -> IntervalWithoutFile -> IntervalWithoutFile
- type Range = Range' SrcFile
- type RangeWithoutFile = Range' ()
- data Range' a
- = NoRange
- | Range !a (Seq IntervalWithoutFile)
- rangeInvariant :: Ord a => Range' a -> Bool
- consecutiveAndSeparated :: Ord a => [Interval' a] -> Bool
- intervalsToRange :: a -> [IntervalWithoutFile] -> Range' a
- intervalToRange :: a -> IntervalWithoutFile -> Range' a
- rangeFromAbsolutePath :: AbsolutePath -> Range
- rangeIntervals :: Range' a -> [IntervalWithoutFile]
- rangeFile :: Range -> SrcFile
- rangeModule' :: Range -> Maybe (Maybe (TopLevelModuleName' Range))
- rangeModule :: Range -> Maybe (TopLevelModuleName' Range)
- rightMargin :: Range -> Range
- noRange :: Range' a
- posToRange :: Position' a -> Position' a -> Range' a
- posToRange' :: a -> PositionWithoutFile -> PositionWithoutFile -> Range' a
- rStart :: Range' a -> Maybe (Position' a)
- rStart' :: Range' a -> Maybe PositionWithoutFile
- rEnd :: Range' a -> Maybe (Position' a)
- rEnd' :: Range' a -> Maybe PositionWithoutFile
- rangeToInterval :: Range' a -> Maybe IntervalWithoutFile
- rangeToIntervalWithFile :: Range' a -> Maybe (Interval' a)
- continuous :: Range' a -> Range' a
- continuousPerLine :: Ord a => Range' a -> Range' a
- newtype PrintRange a = PrintRange a
- class HasRange a where
- class HasRangeWithoutFile a where
- getRangeWithoutFile :: a -> RangeWithoutFile
- class HasRange a => SetRange a where
- class KillRange a where
- killRange :: KillRangeT a
- type KillRangeT a = a -> a
- killRangeMap :: (KillRange k, KillRange v) => KillRangeT (Map k v)
- class KILLRANGE t (b :: Bool) where
- killRangeN :: t -> t
- withRangeOf :: (SetRange t, HasRange u) => t -> u -> t
- fuseRange :: (HasRange u, HasRange t) => u -> t -> Range
- fuseRanges :: Ord a => Range' a -> Range' a -> Range' a
- beginningOf :: Range -> Range
- beginningOfFile :: BeginningOfFile a => a -> Range
- interleaveRanges :: HasRangeWithoutFile a => [a] -> [a] -> ([a], [(a, a)])
Positions
type PositionWithoutFile = Position' () Source #
Represents a point in the input.
If two positions have the same srcFile and posPos components,
then the final two components should be the same as well, but since
this can be hard to enforce the program should not rely too much on
the last two components; they are mainly there to improve error
messages for the user.
Note the invariant which positions have to satisfy: positionInvariant.
Constructors
| Pn | |
Instances
Constructors
| RangeFile | |
Fields
| |
Instances
| EncodeTCM Range Source # | |||||
| Pretty RangeFile Source # | |||||
| Pretty TopLevelModuleName Source # | |||||
Defined in Agda.Syntax.TopLevelModuleName Methods pretty :: TopLevelModuleName -> Doc Source # prettyPrec :: Int -> TopLevelModuleName -> Doc Source # prettyList :: [TopLevelModuleName] -> Doc Source # | |||||
| HasRange Interval Source # | |||||
| HasRange Range Source # | |||||
| KillRange Range Source # | |||||
Defined in Agda.Syntax.Position Methods | |||||
| SetRange Range Source # | |||||
| FreshName Range Source # | |||||
Defined in Agda.TypeChecking.Monad.Base Methods freshName_ :: MonadFresh NameId m => Range -> m Name Source # | |||||
| PrettyTCM Range Source # | |||||
Defined in Agda.TypeChecking.Pretty | |||||
| PrettyTCM TopLevelModuleName Source # | |||||
Defined in Agda.TypeChecking.Pretty Methods prettyTCM :: MonadPretty m => TopLevelModuleName -> m Doc Source # | |||||
| EmbPrj Range Source # | Ranges are always deserialised as | ||||
| EmbPrj RangeFile Source # | |||||
| EmbPrj TopLevelModuleName Source # | |||||
Defined in Agda.TypeChecking.Serialise.Instances.Common | |||||
| Subst Range Source # | |||||
Defined in Agda.TypeChecking.Substitute Associated Types
Methods applySubst :: Substitution' (SubstArg Range) -> Range -> Range Source # | |||||
| Sized TopLevelModuleName Source # | |||||
Defined in Agda.Syntax.TopLevelModuleName | |||||
| ToJSON Range Source # | |||||
| Generic RangeFile Source # | |||||
Defined in Agda.Syntax.Position Associated Types
| |||||
| Read RangeFile Source # | This instance fills in the | ||||
| Show RangeFile Source # | |||||
| NFData Interval Source # | |||||
Defined in Agda.Syntax.Position | |||||
| NFData Position Source # | |||||
Defined in Agda.Syntax.Position | |||||
| NFData RangeFile Source # | |||||
Defined in Agda.Syntax.Position | |||||
| Eq RangeFile Source # | Only the | ||||
| Ord RangeFile Source # | Only the | ||||
| LensClosure MetaInfo Range Source # | |||||
Defined in Agda.TypeChecking.Monad.Base | |||||
| LensClosure MetaVariable Range Source # | |||||
Defined in Agda.TypeChecking.Monad.Base Methods | |||||
| HasRange (TopLevelModuleName' Range) Source # | |||||
Defined in Agda.Syntax.Position | |||||
| KillRange (TopLevelModuleName' Range) Source # | |||||
Defined in Agda.Syntax.Position Methods killRange :: KillRangeT (TopLevelModuleName' Range) Source # | |||||
| SetRange (TopLevelModuleName' Range) Source # | |||||
Defined in Agda.Syntax.Position Methods setRange :: Range -> TopLevelModuleName' Range -> TopLevelModuleName' Range Source # | |||||
| FreshName (Range, String) Source # | |||||
Defined in Agda.TypeChecking.Monad.Base Methods freshName_ :: MonadFresh NameId m => (Range, String) -> m Name Source # | |||||
| type SubstArg Range Source # | |||||
Defined in Agda.TypeChecking.Substitute | |||||
| type Rep RangeFile Source # | |||||
Defined in Agda.Syntax.Position type Rep RangeFile = D1 ('MetaData "RangeFile" "Agda.Syntax.Position" "Agda-2.8.0-FNNdyyq6AygGlTrvnmZq2W" 'False) (C1 ('MetaCons "RangeFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "rangeFilePath") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AbsolutePath) :*: S1 ('MetaSel ('Just "rangeFileName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe (TopLevelModuleName' Range))))) | |||||
mkRangeFile :: AbsolutePath -> Maybe (TopLevelModuleName' Range) -> RangeFile Source #
A smart constructor for RangeFile.
positionInvariant :: Position' a -> Bool Source #
startPos :: Maybe RangeFile -> Position Source #
The first position in a file: position 1, line 1, column 1.
movePos :: Position' a -> Char -> Position' a Source #
Advance the position by one character.
A newline character ('n') moves the position to the first
character in the next line. Any other character moves the
position to the next column.
movePosByString :: Foldable t => Position' a -> t Char -> Position' a Source #
Advance the position by a string.
movePosByString = foldl' movePos
backupPos :: Position' a -> Position' a Source #
Backup the position by one character.
Precondition: The character must not be 'n'.
Intervals
type IntervalWithoutFile = Interval' () Source #
An interval. The iEnd position is not included in the interval.
Note the invariant which intervals have to satisfy: intervalInvariant.
Constructors
| Interval a !PositionWithoutFile !PositionWithoutFile |
Instances
| Pretty IntervalWithoutFile Source # | |||||
Defined in Agda.Syntax.Common.Pretty Methods pretty :: IntervalWithoutFile -> Doc Source # prettyPrec :: Int -> IntervalWithoutFile -> Doc Source # prettyList :: [IntervalWithoutFile] -> Doc Source # | |||||
| HasRange Interval Source # | |||||
| HasRangeWithoutFile IntervalWithoutFile Source # | |||||
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: IntervalWithoutFile -> RangeWithoutFile Source # | |||||
| Foldable Interval' Source # | |||||
Defined in Agda.Syntax.Position Methods fold :: Monoid m => Interval' m -> m # foldMap :: Monoid m => (a -> m) -> Interval' a -> m # foldMap' :: Monoid m => (a -> m) -> Interval' a -> m # foldr :: (a -> b -> b) -> b -> Interval' a -> b # foldr' :: (a -> b -> b) -> b -> Interval' a -> b # foldl :: (b -> a -> b) -> b -> Interval' a -> b # foldl' :: (b -> a -> b) -> b -> Interval' a -> b # foldr1 :: (a -> a -> a) -> Interval' a -> a # foldl1 :: (a -> a -> a) -> Interval' a -> a # toList :: Interval' a -> [a] # length :: Interval' a -> Int # elem :: Eq a => a -> Interval' a -> Bool # maximum :: Ord a => Interval' a -> a # minimum :: Ord a => Interval' a -> a # | |||||
| Traversable Interval' Source # | |||||
Defined in Agda.Syntax.Position | |||||
| Functor Interval' Source # | |||||
| NFData Interval Source # | |||||
Defined in Agda.Syntax.Position | |||||
| NFData IntervalWithoutFile Source # | |||||
Defined in Agda.Syntax.Position Methods rnf :: IntervalWithoutFile -> () # | |||||
| Pretty a => Pretty (Interval' (Maybe a)) Source # | |||||
| EmbPrj a => EmbPrj (Interval' a) Source # | |||||
| Generic (Interval' a) Source # | |||||
Defined in Agda.Syntax.Position Associated Types
| |||||
| Read a => Read (Interval' a) Source # | |||||
| Show a => Show (Interval' a) Source # | |||||
| Eq a => Eq (Interval' a) Source # | |||||
| Ord a => Ord (Interval' a) Source # | |||||
Defined in Agda.Syntax.Position | |||||
| type Rep (Interval' a) Source # | |||||
Defined in Agda.Syntax.Position type Rep (Interval' a) = D1 ('MetaData "Interval'" "Agda.Syntax.Position" "Agda-2.8.0-FNNdyyq6AygGlTrvnmZq2W" 'False) (C1 ('MetaCons "Interval" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIntervalFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Just "iStart'") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PositionWithoutFile) :*: S1 ('MetaSel ('Just "iEnd'") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PositionWithoutFile)))) | |||||
posToInterval :: a -> PositionWithoutFile -> PositionWithoutFile -> Interval' a Source #
Converts a file name and two positions to an interval. Sort the positions ascendingly.
getIntervalFile :: Interval' a -> a Source #
fuseIntervals :: IntervalWithoutFile -> IntervalWithoutFile -> IntervalWithoutFile Source #
Finds the least interval which covers the arguments.
Ranges
type RangeWithoutFile = Range' () Source #
A range is a file name, plus a sequence of intervals, assumed to point to the given file. The intervals should be consecutive and separated.
Note the invariant which ranges have to satisfy: rangeInvariant.
Constructors
| NoRange | |
| Range !a (Seq IntervalWithoutFile) |
Instances
| EncodeTCM Range Source # | |||||
| Pretty TopLevelModuleName Source # | |||||
Defined in Agda.Syntax.TopLevelModuleName Methods pretty :: TopLevelModuleName -> Doc Source # prettyPrec :: Int -> TopLevelModuleName -> Doc Source # prettyList :: [TopLevelModuleName] -> Doc Source # | |||||
| HasRange Range Source # | |||||
| HasRangeWithoutFile RangeWithoutFile Source # | |||||
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: RangeWithoutFile -> RangeWithoutFile Source # | |||||
| KillRange Range Source # | |||||
Defined in Agda.Syntax.Position Methods | |||||
| SetRange Range Source # | |||||
| FreshName Range Source # | |||||
Defined in Agda.TypeChecking.Monad.Base Methods freshName_ :: MonadFresh NameId m => Range -> m Name Source # | |||||
| PrettyTCM Range Source # | |||||
Defined in Agda.TypeChecking.Pretty | |||||
| PrettyTCM TopLevelModuleName Source # | |||||
Defined in Agda.TypeChecking.Pretty Methods prettyTCM :: MonadPretty m => TopLevelModuleName -> m Doc Source # | |||||
| EmbPrj Range Source # | Ranges are always deserialised as | ||||
| EmbPrj TopLevelModuleName Source # | |||||
Defined in Agda.TypeChecking.Serialise.Instances.Common | |||||
| Subst Range Source # | |||||
Defined in Agda.TypeChecking.Substitute Associated Types
Methods applySubst :: Substitution' (SubstArg Range) -> Range -> Range Source # | |||||
| Sized TopLevelModuleName Source # | |||||
Defined in Agda.Syntax.TopLevelModuleName | |||||
| ToJSON Range Source # | |||||
| Foldable Range' Source # | |||||
Defined in Agda.Syntax.Position Methods fold :: Monoid m => Range' m -> m # foldMap :: Monoid m => (a -> m) -> Range' a -> m # foldMap' :: Monoid m => (a -> m) -> Range' a -> m # foldr :: (a -> b -> b) -> b -> Range' a -> b # foldr' :: (a -> b -> b) -> b -> Range' a -> b # foldl :: (b -> a -> b) -> b -> Range' a -> b # foldl' :: (b -> a -> b) -> b -> Range' a -> b # foldr1 :: (a -> a -> a) -> Range' a -> a # foldl1 :: (a -> a -> a) -> Range' a -> a # elem :: Eq a => a -> Range' a -> Bool # maximum :: Ord a => Range' a -> a # minimum :: Ord a => Range' a -> a # | |||||
| Traversable Range' Source # | |||||
| Functor Range' Source # | |||||
| LensClosure MetaInfo Range Source # | |||||
Defined in Agda.TypeChecking.Monad.Base | |||||
| LensClosure MetaVariable Range Source # | |||||
Defined in Agda.TypeChecking.Monad.Base Methods | |||||
| Pretty a => Pretty (Range' (Maybe a)) Source # | |||||
| HasRange (TopLevelModuleName' Range) Source # | |||||
Defined in Agda.Syntax.Position | |||||
| KillRange (TopLevelModuleName' Range) Source # | |||||
Defined in Agda.Syntax.Position Methods killRange :: KillRangeT (TopLevelModuleName' Range) Source # | |||||
| SetRange (TopLevelModuleName' Range) Source # | |||||
Defined in Agda.Syntax.Position Methods setRange :: Range -> TopLevelModuleName' Range -> TopLevelModuleName' Range Source # | |||||
| Null (Range' a) Source # | |||||
| Eq a => Monoid (Range' a) Source # | |||||
| Eq a => Semigroup (Range' a) Source # | |||||
| Generic (Range' a) Source # | |||||
Defined in Agda.Syntax.Position Associated Types
| |||||
| Read a => Read (Range' a) Source # | Note that the grammar implemented by this instance does not necessarily match the current representation of ranges. | ||||
| Show a => Show (Range' a) Source # | |||||
| NFData a => NFData (Range' a) Source # | |||||
Defined in Agda.Syntax.Position | |||||
| Eq a => Eq (Range' a) Source # | |||||
| Ord a => Ord (Range' a) Source # | |||||
Defined in Agda.Syntax.Position | |||||
| FreshName (Range, String) Source # | |||||
Defined in Agda.TypeChecking.Monad.Base Methods freshName_ :: MonadFresh NameId m => (Range, String) -> m Name Source # | |||||
| type SubstArg Range Source # | |||||
Defined in Agda.TypeChecking.Substitute | |||||
| type Rep (Range' a) Source # | |||||
Defined in Agda.Syntax.Position type Rep (Range' a) = D1 ('MetaData "Range'" "Agda.Syntax.Position" "Agda-2.8.0-FNNdyyq6AygGlTrvnmZq2W" 'False) (C1 ('MetaCons "NoRange" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Range" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq IntervalWithoutFile)))) | |||||
consecutiveAndSeparated :: Ord a => [Interval' a] -> Bool Source #
Are the intervals consecutive and separated, do they all point to the same file, and do they satisfy the interval invariant?
intervalsToRange :: a -> [IntervalWithoutFile] -> Range' a Source #
Turns a file name plus a list of intervals into a range.
Precondition: consecutiveAndSeparated.
intervalToRange :: a -> IntervalWithoutFile -> Range' a Source #
Converts a file name and an interval to a range.
rangeFromAbsolutePath :: AbsolutePath -> Range Source #
Range pointing to the first position in the given file.
rangeIntervals :: Range' a -> [IntervalWithoutFile] Source #
The intervals that make up the range. The intervals are
consecutive and separated (consecutiveAndSeparated).
rangeModule' :: Range -> Maybe (Maybe (TopLevelModuleName' Range)) Source #
rangeModule :: Range -> Maybe (TopLevelModuleName' Range) Source #
The range's top-level module name, if any.
rightMargin :: Range -> Range Source #
Conflate a range to its right margin.
posToRange :: Position' a -> Position' a -> Range' a Source #
Converts two positions to a range.
Precondition: The positions have to point to the same file.
posToRange' :: a -> PositionWithoutFile -> PositionWithoutFile -> Range' a Source #
Converts a file name and two positions to a range.
rEnd :: Range' a -> Maybe (Position' a) Source #
The position after the final position in the range, if any.
rEnd' :: Range' a -> Maybe PositionWithoutFile Source #
The position after the final position in the range, if any.
rangeToInterval :: Range' a -> Maybe IntervalWithoutFile Source #
Converts a range to an interval, if possible. Note that the information about the source file is lost.
rangeToIntervalWithFile :: Range' a -> Maybe (Interval' a) Source #
Converts a range to an interval, if possible.
continuous :: Range' a -> Range' a Source #
Returns the shortest continuous range containing the given one.
continuousPerLine :: Ord a => Range' a -> Range' a Source #
Removes gaps between intervals on the same line.
newtype PrintRange a Source #
Wrapper to indicate that range should be printed.
Constructors
| PrintRange a |
Instances
| (Pretty a, HasRange a) => Pretty (PrintRange a) Source # | |
Defined in Agda.Syntax.Common.Pretty Methods pretty :: PrintRange a -> Doc Source # prettyPrec :: Int -> PrintRange a -> Doc Source # prettyList :: [PrintRange a] -> Doc Source # | |
| HasRange a => HasRange (PrintRange a) Source # | |
Defined in Agda.Syntax.Position Methods getRange :: PrintRange a -> Range Source # | |
| KillRange a => KillRange (PrintRange a) Source # | |
Defined in Agda.Syntax.Position Methods killRange :: KillRangeT (PrintRange a) Source # | |
| SetRange a => SetRange (PrintRange a) Source # | |
Defined in Agda.Syntax.Position Methods setRange :: Range -> PrintRange a -> PrintRange a Source # | |
| Eq a => Eq (PrintRange a) Source # | |
Defined in Agda.Syntax.Position | |
| Ord a => Ord (PrintRange a) Source # | |
Defined in Agda.Syntax.Position Methods compare :: PrintRange a -> PrintRange a -> Ordering # (<) :: PrintRange a -> PrintRange a -> Bool # (<=) :: PrintRange a -> PrintRange a -> Bool # (>) :: PrintRange a -> PrintRange a -> Bool # (>=) :: PrintRange a -> PrintRange a -> Bool # max :: PrintRange a -> PrintRange a -> PrintRange a # min :: PrintRange a -> PrintRange a -> PrintRange a # | |
class HasRange a where Source #
Things that have a range are instances of this class.
Minimal complete definition
Nothing
Methods
Instances
| HasRange HaskellPragma Source # | |
Defined in Agda.Compiler.MAlonzo.Pragmas Methods getRange :: HaskellPragma -> Range Source # | |
| HasRange BindName Source # | |
| HasRange Declaration Source # | |
Defined in Agda.Syntax.Abstract Methods getRange :: Declaration -> Range Source # | |
| HasRange Expr Source # | |
| HasRange LHS Source # | |
| HasRange LamBinding Source # | |
Defined in Agda.Syntax.Abstract Methods getRange :: LamBinding -> Range Source # | |
| HasRange LetBinding Source # | |
Defined in Agda.Syntax.Abstract Methods getRange :: LetBinding -> Range Source # | |
| HasRange RHS Source # | |
| HasRange SpineLHS Source # | |
| HasRange TypedBinding Source # | |
Defined in Agda.Syntax.Abstract Methods getRange :: TypedBinding -> Range Source # | |
| HasRange WhereDeclarations Source # | |
Defined in Agda.Syntax.Abstract Methods getRange :: WhereDeclarations -> Range Source # | |
| HasRange AmbiguousQName Source # | The range of an |
Defined in Agda.Syntax.Abstract.Name Methods getRange :: AmbiguousQName -> Range Source # | |
| HasRange ModuleName Source # | |
Defined in Agda.Syntax.Abstract.Name Methods getRange :: ModuleName -> Range Source # | |
| HasRange Name Source # | |
| HasRange QName Source # | |
| HasRange Access Source # | |
| HasRange Annotation Source # | |
Defined in Agda.Syntax.Common Methods getRange :: Annotation -> Range Source # | |
| HasRange ArgInfo Source # | |
| HasRange Cohesion Source # | |
| HasRange Erased Source # | |
| HasRange Fixity Source # | |
| HasRange Hiding Source # | |
| HasRange IsInstance Source # | |
Defined in Agda.Syntax.Common Methods getRange :: IsInstance -> Range Source # | |
| HasRange IsMacro Source # | |
| HasRange Modality Source # | |
| HasRange NotationPart Source # | |
Defined in Agda.Syntax.Common Methods getRange :: NotationPart -> Range Source # | |
| HasRange Origin Source # | |
| HasRange OriginIrrelevant Source # | |
Defined in Agda.Syntax.Common Methods getRange :: OriginIrrelevant -> Range Source # | |
| HasRange OriginRelevant Source # | |
Defined in Agda.Syntax.Common Methods getRange :: OriginRelevant -> Range Source # | |
| HasRange OriginShapeIrrelevant Source # | |
Defined in Agda.Syntax.Common Methods | |
| HasRange PatternOrCopattern Source # | |
Defined in Agda.Syntax.Common Methods getRange :: PatternOrCopattern -> Range Source # | |
| HasRange PolarityModality Source # | |
Defined in Agda.Syntax.Common Methods getRange :: PolarityModality -> Range Source # | |
| HasRange Q0Origin Source # | |
| HasRange Q1Origin Source # | |
| HasRange Quantity Source # | |
| HasRange QωOrigin Source # | |
| HasRange Relevance Source # | |
| HasRange Induction Source # | |
| HasRange KwRange Source # | |
| HasRange AsName Source # | |
| HasRange Binder Source # | |
| HasRange BoundName Source # | |
| HasRange Declaration Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: Declaration -> Range Source # | |
| HasRange DoStmt Source # | |
| HasRange Expr Source # | |
| HasRange LHS Source # | |
| HasRange LHSCore Source # | |
| HasRange LamBinding Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: LamBinding -> Range Source # | |
| HasRange LamClause Source # | |
| HasRange ModuleApplication Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: ModuleApplication -> Range Source # | |
| HasRange ModuleAssignment Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: ModuleAssignment -> Range Source # | |
| HasRange Pattern Source # | |
| HasRange Pragma Source # | |
| HasRange RHS Source # | |
| HasRange RecordDirective Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: RecordDirective -> Range Source # | |
| HasRange TypedBinding Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: TypedBinding -> Range Source # | |
| HasRange WhereClause Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: WhereClause -> Range Source # | |
| HasRange Attr Source # | |
| HasRange Attribute Source # | |
| HasRange DeclarationException Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Errors Methods getRange :: DeclarationException -> Range Source # | |
| HasRange DeclarationException' Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Errors Methods | |
| HasRange DeclarationWarning Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Errors Methods getRange :: DeclarationWarning -> Range Source # | |
| HasRange DeclarationWarning' Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Errors Methods getRange :: DeclarationWarning' -> Range Source # | |
| HasRange NiceDeclaration Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Types Methods getRange :: NiceDeclaration -> Range Source # | |
| HasRange Name Source # | |
| HasRange QName Source # | |
| HasRange AppInfo Source # | |
| HasRange ConPatInfo Source # | |
Defined in Agda.Syntax.Info Methods getRange :: ConPatInfo -> Range Source # | |
| HasRange DeclInfo Source # | |
| HasRange ExprInfo Source # | |
| HasRange LHSInfo Source # | |
| HasRange LetInfo Source # | |
| HasRange MetaInfo Source # | |
| HasRange ModuleInfo Source # | |
Defined in Agda.Syntax.Info Methods getRange :: ModuleInfo -> Range Source # | |
| HasRange MutualInfo Source # | |
Defined in Agda.Syntax.Info Methods getRange :: MutualInfo -> Range Source # | |
| HasRange PatInfo Source # | |
| HasRange Clause Source # | |
| HasRange ConHead Source # | |
| HasRange ParseError Source # | |
Defined in Agda.Syntax.Parser.Monad Methods getRange :: ParseError -> Range Source # | |
| HasRange ParseWarning Source # | |
Defined in Agda.Syntax.Parser.Monad Methods getRange :: ParseWarning -> Range Source # | |
| HasRange Token Source # | |
| HasRange Interval Source # | |
| HasRange Range Source # | |
| HasRange AbstractName Source # | |
Defined in Agda.Syntax.Scope.Base Methods getRange :: AbstractName -> Range Source # | |
| HasRange RawTopLevelModuleName Source # | |
Defined in Agda.Syntax.TopLevelModuleName Methods | |
| HasRange Call Source # | |
| HasRange CallInfo Source # | |
| HasRange CompilerPragma Source # | |
Defined in Agda.TypeChecking.Monad.Base Methods getRange :: CompilerPragma -> Range Source # | |
| HasRange Constraint Source # | |
Defined in Agda.TypeChecking.Monad.Base Methods getRange :: Constraint -> Range Source # | |
| HasRange MetaInfo Source # | |
| HasRange MetaVariable Source # | |
Defined in Agda.TypeChecking.Monad.Base Methods getRange :: MetaVariable -> Range Source # | |
| HasRange ProblemConstraint Source # | |
Defined in Agda.TypeChecking.Monad.Base Methods getRange :: ProblemConstraint -> Range Source # | |
| HasRange TCErr Source # | |
| HasRange TCWarning Source # | |
| HasRange Item Source # | |
| HasRange () Source # | |
Defined in Agda.Syntax.Position | |
| HasRange Bool Source # | |
| HasRange a => HasRange (Binder' a) Source # | |
| HasRange a => HasRange (Clause' a) Source # | |
| HasRange (LHSCore' e) Source # | |
| HasRange (Pattern' e) Source # | |
| HasRange a => HasRange (Arg a) Source # | |
| HasRange a => HasRange (HasEta' a) Source # | |
| HasRange a => HasRange (MaybePlaceholder a) Source # | |
Defined in Agda.Syntax.Common Methods getRange :: MaybePlaceholder a -> Range Source # | |
| HasRange (Ranged a) Source # | |
| HasRange a => HasRange (RecordDirectives' a) Source # | |
Defined in Agda.Syntax.Common Methods getRange :: RecordDirectives' a -> Range Source # | |
| HasRange a => HasRange (WithHiding a) Source # | |
Defined in Agda.Syntax.Common Methods getRange :: WithHiding a -> Range Source # | |
| HasRange a => HasRange (WithOrigin a) Source # | |
Defined in Agda.Syntax.Common Methods getRange :: WithOrigin a -> Range Source # | |
| HasRange a => HasRange (FieldAssignment' a) Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: FieldAssignment' a -> Range Source # | |
| HasRange e => HasRange (OpApp e) Source # | |
| HasRange (TacticAttribute' a) Source # | |
Defined in Agda.Syntax.Concrete Methods getRange :: TacticAttribute' a -> Range Source # | |
| IsExpr e => HasRange (ExprView e) Source # | |
| HasRange (DefInfo' t) Source # | |
| HasRange a => HasRange (PrintRange a) Source # | |
Defined in Agda.Syntax.Position Methods getRange :: PrintRange a -> Range Source # | |
| HasRange (TopLevelModuleName' Range) Source # | |
Defined in Agda.Syntax.Position | |
| HasRange a => HasRange (Closure a) Source # | |
| HasRange a => HasRange (List1 a) Source # | Precondition: The ranges of the list elements must point to the same file (or be empty). |
| HasRange a => HasRange (List2 a) Source # | |
| HasRange a => HasRange (Set1 a) Source # | |
| HasRange a => HasRange (Maybe a) Source # | |
| HasRange a => HasRange [a] Source # | Precondition: The ranges of the list elements must point to the same file (or be empty). |
Defined in Agda.Syntax.Position | |
| (HasRange a, HasRange b) => HasRange (ImportDirective' a b) Source # | |
Defined in Agda.Syntax.Common Methods getRange :: ImportDirective' a b -> Range Source # | |
| (HasRange a, HasRange b) => HasRange (ImportedName' a b) Source # | |
Defined in Agda.Syntax.Common Methods getRange :: ImportedName' a b -> Range Source # | |
| HasRange a => HasRange (Named name a) Source # | |
| (HasRange a, HasRange b) => HasRange (Renaming' a b) Source # | |
| (HasRange a, HasRange b) => HasRange (Using' a b) Source # | |
| HasRange a => HasRange (Dom' t a) Source # | |
| (HasRange a, HasRange b) => HasRange (Either a b) Source # | |
| (HasRange a, HasRange b) => HasRange (a, b) Source # | Precondition: The ranges of the tuple elements must point to the same file (or be empty). |
Defined in Agda.Syntax.Position | |
| (HasRange a, HasRange b, HasRange c) => HasRange (a, b, c) Source # | Precondition: The ranges of the tuple elements must point to the same file (or be empty). |
Defined in Agda.Syntax.Position | |
| (HasRange qn, HasRange nm, HasRange p, HasRange e) => HasRange (RewriteEqn' qn nm p e) Source # | |
Defined in Agda.Syntax.Common Methods getRange :: RewriteEqn' qn nm p e -> Range Source # | |
| (HasRange a, HasRange b, HasRange c, HasRange d) => HasRange (a, b, c, d) Source # | Precondition: The ranges of the tuple elements must point to the same file (or be empty). |
Defined in Agda.Syntax.Position | |
| (HasRange a, HasRange b, HasRange c, HasRange d, HasRange e) => HasRange (a, b, c, d, e) Source # | Precondition: The ranges of the tuple elements must point to the same file (or be empty). |
Defined in Agda.Syntax.Position | |
| (HasRange a, HasRange b, HasRange c, HasRange d, HasRange e, HasRange f) => HasRange (a, b, c, d, e, f) Source # | Precondition: The ranges of the tuple elements must point to the same file (or be empty). |
Defined in Agda.Syntax.Position | |
| (HasRange a, HasRange b, HasRange c, HasRange d, HasRange e, HasRange f, HasRange g) => HasRange (a, b, c, d, e, f, g) Source # | Precondition: The ranges of the tuple elements must point to the same file (or be empty). |
Defined in Agda.Syntax.Position | |
class HasRangeWithoutFile a where Source #
Things that have a RangeWithoutFile are instances of this class.
Minimal complete definition
Nothing
Methods
getRangeWithoutFile :: a -> RangeWithoutFile Source #
default getRangeWithoutFile :: forall (t :: Type -> Type) b. (Foldable t, HasRangeWithoutFile b, t b ~ a) => a -> RangeWithoutFile Source #
Instances
| HasRangeWithoutFile Layer Source # | |
Defined in Agda.Syntax.Parser.Literate Methods | |
| HasRangeWithoutFile Token Source # | |
Defined in Agda.Syntax.Parser.Tokens Methods | |
| HasRangeWithoutFile IntervalWithoutFile Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: IntervalWithoutFile -> RangeWithoutFile Source # | |
| HasRangeWithoutFile RangeWithoutFile Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: RangeWithoutFile -> RangeWithoutFile Source # | |
| HasRangeWithoutFile () Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: () -> RangeWithoutFile Source # | |
| HasRangeWithoutFile Bool Source # | |
Defined in Agda.Syntax.Position Methods | |
| HasRangeWithoutFile a => HasRangeWithoutFile (List1 a) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: List1 a -> RangeWithoutFile Source # | |
| HasRangeWithoutFile a => HasRangeWithoutFile (List2 a) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: List2 a -> RangeWithoutFile Source # | |
| HasRangeWithoutFile a => HasRangeWithoutFile (Set1 a) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: Set1 a -> RangeWithoutFile Source # | |
| HasRangeWithoutFile a => HasRangeWithoutFile (Maybe a) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: Maybe a -> RangeWithoutFile Source # | |
| HasRangeWithoutFile a => HasRangeWithoutFile [a] Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: [a] -> RangeWithoutFile Source # | |
| (HasRangeWithoutFile a, HasRangeWithoutFile b) => HasRangeWithoutFile (Either a b) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: Either a b -> RangeWithoutFile Source # | |
| (HasRangeWithoutFile a, HasRangeWithoutFile b) => HasRangeWithoutFile (a, b) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: (a, b) -> RangeWithoutFile Source # | |
| (HasRangeWithoutFile a, HasRangeWithoutFile b, HasRangeWithoutFile c) => HasRangeWithoutFile (a, b, c) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: (a, b, c) -> RangeWithoutFile Source # | |
| (HasRangeWithoutFile a, HasRangeWithoutFile b, HasRangeWithoutFile c, HasRangeWithoutFile d) => HasRangeWithoutFile (a, b, c, d) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: (a, b, c, d) -> RangeWithoutFile Source # | |
| (HasRangeWithoutFile a, HasRangeWithoutFile b, HasRangeWithoutFile c, HasRangeWithoutFile d, HasRangeWithoutFile e) => HasRangeWithoutFile (a, b, c, d, e) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: (a, b, c, d, e) -> RangeWithoutFile Source # | |
| (HasRangeWithoutFile a, HasRangeWithoutFile b, HasRangeWithoutFile c, HasRangeWithoutFile d, HasRangeWithoutFile e, HasRangeWithoutFile f) => HasRangeWithoutFile (a, b, c, d, e, f) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: (a, b, c, d, e, f) -> RangeWithoutFile Source # | |
| (HasRangeWithoutFile a, HasRangeWithoutFile b, HasRangeWithoutFile c, HasRangeWithoutFile d, HasRangeWithoutFile e, HasRangeWithoutFile f, HasRangeWithoutFile g) => HasRangeWithoutFile (a, b, c, d, e, f, g) Source # | |
Defined in Agda.Syntax.Position Methods getRangeWithoutFile :: (a, b, c, d, e, f, g) -> RangeWithoutFile Source # | |
class HasRange a => SetRange a where Source #
If it is also possible to set the range, this is the class.
Minimal complete definition
Nothing
Methods
Instances
| SetRange BindName Source # | |
| SetRange ModuleName Source # | |
Defined in Agda.Syntax.Abstract.Name Methods setRange :: Range -> ModuleName -> ModuleName Source # | |
| SetRange Name Source # | |
| SetRange QName Source # | |
| SetRange Cohesion Source # | |
| SetRange NotationPart Source # | |
Defined in Agda.Syntax.Common Methods setRange :: Range -> NotationPart -> NotationPart Source # | |
| SetRange OriginIrrelevant Source # | |
Defined in Agda.Syntax.Common Methods setRange :: Range -> OriginIrrelevant -> OriginIrrelevant Source # | |
| SetRange OriginRelevant Source # | |
Defined in Agda.Syntax.Common Methods setRange :: Range -> OriginRelevant -> OriginRelevant Source # | |
| SetRange OriginShapeIrrelevant Source # | |
Defined in Agda.Syntax.Common Methods setRange :: Range -> OriginShapeIrrelevant -> OriginShapeIrrelevant Source # | |
| SetRange PolarityModality Source # | |
Defined in Agda.Syntax.Common Methods setRange :: Range -> PolarityModality -> PolarityModality Source # | |
| SetRange Q0Origin Source # | |
| SetRange | |