Copyright | (c) 2013-2016 Galois Inc. |
---|---|
License | BSD3 |
Maintainer | cryptol@galois.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- data Located a = Located {}
- data Position = Position {}
- data Range = Range {}
- 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
Eq Position Source # | |
Ord Position Source # | |
Defined in Cryptol.Parser.Position | |
Show Position Source # | |
Generic Position Source # | |
NFData Position Source # | |
Defined in Cryptol.Parser.Position | |
PP Position Source # | |
type Rep Position Source # | |
Defined in Cryptol.Parser.Position type Rep Position = D1 ('MetaData "Position" "Cryptol.Parser.Position" "cryptol-2.11.0-KBQWpCBm4GD4lGHyVVV39L" '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
Eq Range Source # | |
Ord Range Source # | |
Show Range Source # | |
Generic Range Source # | |
NFData Range Source # | |
Defined in Cryptol.Parser.Position | |
PP Range Source # | |
HasLoc Range Source # | |
NoPos Range Source # | |
type Rep Range Source # | |
Defined in Cryptol.Parser.Position type Rep Range = D1 ('MetaData "Range" "Cryptol.Parser.Position" "cryptol-2.11.0-KBQWpCBm4GD4lGHyVVV39L" '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)))) |
emptyRange :: Range Source #
An empty range.
Caution: using this on the LHS of a use of rComb will cause the empty source to propagate.
Instances
HasLoc Range Source # | |
HasLoc Expr Source # | |
HasLoc a => HasLoc [a] Source # | |
HasLoc (Located a) Source # | |
HasLoc (Type name) Source # | |
HasLoc (TParam name) Source # | |
HasLoc (Schema name) Source # | |
HasLoc a => HasLoc (Named a) Source # | |
HasLoc (Pattern name) Source # | |
HasLoc (Match name) Source # | |
HasLoc (Expr name) Source # | |
HasLoc a => HasLoc (TopLevel a) Source # | |
HasLoc (PrimType name) Source # | |
HasLoc (Newtype name) Source # | |
HasLoc (Bind name) Source # | |
HasLoc (ParameterFun name) Source # | |
Defined in Cryptol.Parser.AST | |
HasLoc (ParameterType name) Source # | |
Defined in Cryptol.Parser.AST | |
HasLoc (Decl name) Source # | |
HasLoc (TopDecl name) Source # | |
HasLoc (Module name) Source # | |
(HasLoc a, HasLoc b) => HasLoc (a, b) Source # | |