| Copyright | (c) 2013-2016 Galois Inc. | 
|---|---|
| License | BSD3 | 
| Maintainer | cryptol@galois.com | 
| Stability | provisional | 
| Portability | portable | 
| Safe Haskell | Safe | 
| Language | Haskell2010 | 
Cryptol.Parser.Position
Description
Synopsis
- data Located a = Located {}
 - data Position = Position {}
 - data Range = Range {}
 - rangeWithin :: Range -> Range -> Bool
 - emptyRange :: Range
 - start :: Position
 - move :: Position -> Char -> Position
 - moves :: Position -> Text -> Position
 - rComb :: Range -> Range -> Range
 - rCombMaybe :: Maybe Range -> Maybe Range -> Maybe Range
 - rCombs :: [Range] -> Range
 - class HasLoc t where
 - class HasLoc t => AddLoc t where
 - at :: (HasLoc l, AddLoc t) => l -> t -> t
 - combLoc :: (a -> b -> c) -> Located a -> Located b -> Located c
 
Documentation
Instances
Instances
| Generic Position Source # | |
| Show Position Source # | |
| PP Position Source # | |
| NFData Position Source # | |
Defined in Cryptol.Parser.Position  | |
| Eq Position Source # | |
| Ord Position Source # | |
Defined in Cryptol.Parser.Position  | |
| type Rep Position Source # | |
Defined in Cryptol.Parser.Position type Rep Position = D1 ('MetaData "Position" "Cryptol.Parser.Position" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "Position" 'PrefixI 'True) (S1 ('MetaSel ('Just "line") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "col") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))  | |
Instances
| Generic Range Source # | |
| Show Range Source # | |
| NoPos Range Source # | |
| HasLoc Range Source # | |
| PP Range Source # | |
| NFData Range Source # | |
Defined in Cryptol.Parser.Position  | |
| Eq Range Source # | |
| Ord Range Source # | |
| type Rep Range Source # | |
Defined in Cryptol.Parser.Position type Rep Range = D1 ('MetaData "Range" "Cryptol.Parser.Position" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "from") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Position) :*: (S1 ('MetaSel ('Just "to") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Position) :*: S1 ('MetaSel ('Just "source") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath))))  | |
rangeWithin :: Range -> Range -> Bool Source #
Returns True if the first range is contained in the second one.
emptyRange :: Range Source #
An empty range.
Caution: using this on the LHS of a use of rComb will cause the empty source to propagate.