Modulehaskell-src-exts-1.23.1Haskell98
Language.Haskell.Exts.SrcLoc
This module defines various data types representing source location information, of varying degree of preciseness.
- 4 types
- 1 class
- 18 values
- Packagehaskell-src-exts-1.23.1
- Exports23
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceSrcLoc.hs
A single position in the source.
Instances8Eq, Data, Ord, Show, Generic, Pretty, …
Eq SrcLocDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocData SrcLocDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocOrd SrcLocDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocShow SrcLocDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocGeneric SrcLocDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocPretty SrcLocDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.PrettySrcInfo SrcLocDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLoctype Rep SrcLoc = D1 ('MetaDataDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLoc"SrcLoc"
"Language.Haskell.Exts.SrcLoc"
"haskell-src-exts-1.23.1-DFmdx3QFAK119MdeK32KB4"
'False) (C1 ('MetaCons"SrcLoc"
'PrefixI 'True) (S1 ('MetaSel ('Just"srcFilename"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just"srcLine"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just"srcColumn"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))
A portion of the source, spanning one or more lines and zero or more columns.
Constructors
Instances8Eq, Data, Ord, Show, Generic, Pretty, …
Eq SrcSpanDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocData SrcSpanDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocOrd SrcSpanDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocShow SrcSpanDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocGeneric SrcSpanDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocPretty SrcSpanDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.PrettySrcInfo SrcSpanDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLoctype Rep SrcSpan = D1 ('MetaDataDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLoc"SrcSpan"
"Language.Haskell.Exts.SrcLoc"
"haskell-src-exts-1.23.1-DFmdx3QFAK119MdeK32KB4"
'False) (C1 ('MetaCons"SrcSpan"
'PrefixI 'True) ((S1 ('MetaSel ('Just"srcSpanFilename"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just"srcSpanStartLine"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just"srcSpanStartColumn"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just"srcSpanEndLine"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just"srcSpanEndColumn"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))))
Returns srcSpanStartLine and srcSpanStartColumn in a pair.
Returns srcSpanEndLine and srcSpanEndColumn in a pair.
Combine two locations in the source to denote a span.
Merge two source spans into a single span from the start of the first to the end of the second. Assumes that the two spans relate to the same source file.
Test if a given span starts and ends at the same location.
Instances5Eq, Ord, Show, Generic, Rep
Eq a => Eq (Loc a)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocOrd a => Ord (Loc a)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocShow a => Show (Loc a)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocGeneric (Loc a)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLoctype Rep (Loc a) = D1 ('MetaDataDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLoc"Loc"
"Language.Haskell.Exts.SrcLoc"
"haskell-src-exts-1.23.1-DFmdx3QFAK119MdeK32KB4"
'False) (C1 ('MetaCons"Loc"
'PrefixI 'True) (S1 ('MetaSel ('Just"loc"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpan) :*: S1 ('MetaSel ('Just"unLoc"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
A portion of the source, extended with information on the position of entities within the span.
Constructors
Instances18Eq, Data, Ord, Show, Generic, SrcInfo, …
Eq SrcSpanInfoDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocData SrcSpanInfoDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocOrd SrcSpanInfoDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocShow SrcSpanInfoDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocGeneric SrcSpanInfoDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocSrcInfo SrcSpanInfoDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLocParseable (NonGreedy (ListOf (ModulePragma SrcSpanInfo)))Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.ParserParseable (NonGreedy (ModuleHeadAndImports SrcSpanInfo))Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.ParserParseable (NonGreedy (PragmasAndModuleHead SrcSpanInfo))Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.ParserParseable (NonGreedy (PragmasAndModuleName SrcSpanInfo))Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.ParserParseable (Decl SrcSpanInfo)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.Parser · orphanParseable (Exp SrcSpanInfo)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.Parser · orphanParseable (ImportDecl SrcSpanInfo)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.Parser · orphanParseable (Module SrcSpanInfo)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.Parser · orphanParseable (Pat SrcSpanInfo)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.Parser · orphanParseable (Stmt SrcSpanInfo)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.Parser · orphanParseable (Type SrcSpanInfo)Defined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.Parser · orphantype Rep SrcSpanInfo = D1 ('MetaDataDefined in haskell-src-exts-1.23.1 · Language.Haskell.Exts.SrcLoc"SrcSpanInfo"
"Language.Haskell.Exts.SrcLoc"
"haskell-src-exts-1.23.1-DFmdx3QFAK119MdeK32KB4"
'False) (C1 ('MetaCons"SrcSpanInfo"
'PrefixI 'True) (S1 ('MetaSel ('Just"srcInfoSpan"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpan) :*: S1 ('MetaSel ('Just"srcInfoPoints"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SrcSpan])))
Generate a SrcSpanInfo with no positional information for entities.
A bogus SrcSpanInfo, the location is noLoc.
`noSrcSpan = noInfoSpan (mkSrcSpan noLoc noLoc)`
Generate a SrcSpanInfo with the supplied positional information for entities.
Combine two SrcSpanInfos into one that spans the combined source area of the two arguments, leaving positional information blank.
Like (<+?>), but it also concatenates the srcInfoPoints.
Short name for combSpanInfo
Optionally combine the first argument with the second, or return it unchanged if the second argument is Nothing.
Optionally combine the second argument with the first, or return it unchanged if the first argument is Nothing.
Add more positional information for entities of a span.
Merge two SrcSpans and lift them to a SrcInfoSpan with
no positional information for entities.
A class to work over all kinds of source location information.
Methods
toSrcInfo :: SrcLoc -> [SrcSpan] -> SrcLoc -> sifromSrcInfo :: SrcSpanInfo -> sigetPointLoc :: si -> SrcLocfileName :: si -> StringstartLine :: si -> IntstartColumn :: si -> Int