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
- 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
Functor Located Source # | |
Eq a => Eq (Located a) Source # | |
Ord a => Ord (Located a) Source # | |
Defined in Cryptol.Parser.Position | |
Show a => Show (Located a) Source # | |
Generic (Located a) Source # | |
NFData a => NFData (Located a) Source # | |
Defined in Cryptol.Parser.Position | |
PPName a => PPName (Located a) Source # | |
Defined in Cryptol.Parser.Position | |
PP a => PP (Located a) Source # | |
AddLoc (Located a) Source # | |
HasLoc (Located a) Source # | |
NoPos (Located t) Source # | |
ShowParseable a => ShowParseable (Located a) Source # | |
Defined in Cryptol.TypeCheck.Parseable showParseable :: Located a -> Doc Source # | |
type Rep (Located a) Source # | |
Defined in Cryptol.Parser.Position type Rep (Located a) = D1 (MetaData "Located" "Cryptol.Parser.Position" "cryptol-2.9.1-EDtcoHURvveHmx5M6ZZjMK" False) (C1 (MetaCons "Located" PrefixI True) (S1 (MetaSel (Just "srcRange") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Range) :*: S1 (MetaSel (Just "thing") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a))) |
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.9.1-EDtcoHURvveHmx5M6ZZjMK" 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.9.1-EDtcoHURvveHmx5M6ZZjMK" 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 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 # | |