Copyright | (c) Mesabloo 2021-2022 |
---|---|
License | BSD3 |
Stability | experimental |
Portability | Portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Documentation
Contains information about the location of something.
It is best used in a datatype like:
data Located a = a :@ Position deriving (Show, Eq, Ord, Functor, Traversable)
Columns are specified in amount of Unicode codepoints from the beginning of the line. Lines and columns start at 1.
Instances
ToJSON Position Source # | |
Generic Position Source # | |
Show Position Source # | |
Default Position Source # | |
Defined in Error.Diagnose.Position | |
Eq Position Source # | |
Ord Position Source # | |
Defined in Error.Diagnose.Position | |
Hashable Position Source # | |
Pretty Position Source # | |
type Rep Position Source # | |
Defined in Error.Diagnose.Position type Rep Position = D1 ('MetaData "Position" "Error.Diagnose.Position" "diagnose-2.5.1-inplace" 'False) (C1 ('MetaCons "Position" 'PrefixI 'True) (S1 ('MetaSel ('Just "begin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int, Int)) :*: (S1 ('MetaSel ('Just "end") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int, Int)) :*: S1 ('MetaSel ('Just "file") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))) |