License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Swarm.Language.Syntax.Loc
Description
Types for working with locations of something in source code.
Documentation
The location of something in the textual source code (recorded as an interval measured in terms of indices into the input stream).
Instances
FromJSON SrcLoc Source # | |||||
Defined in Swarm.Language.Syntax.Loc | |||||
ToJSON SrcLoc Source # | |||||
Data SrcLoc Source # | |||||
Defined in Swarm.Language.Syntax.Loc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcLoc -> c SrcLoc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcLoc # toConstr :: SrcLoc -> Constr # dataTypeOf :: SrcLoc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcLoc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcLoc) # gmapT :: (forall b. Data b => b -> b) -> SrcLoc -> SrcLoc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcLoc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcLoc -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcLoc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcLoc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc # | |||||
Monoid SrcLoc Source # |
| ||||
Semigroup SrcLoc Source # |
| ||||
Generic SrcLoc Source # | |||||
Defined in Swarm.Language.Syntax.Loc Associated Types
| |||||
Show SrcLoc Source # | |||||
Eq SrcLoc Source # | |||||
Ord SrcLoc Source # | |||||
Hashable SrcLoc Source # | |||||
Defined in Swarm.Language.Syntax.Loc | |||||
type Rep SrcLoc Source # | |||||
Defined in Swarm.Language.Syntax.Loc type Rep SrcLoc = D1 ('MetaData "SrcLoc" "Swarm.Language.Syntax.Loc" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-lang" 'False) (C1 ('MetaCons "NoLoc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SrcLoc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
A variable with associated source location, used for variable binding sites. (Variable occurrences are a bare TVar which gets wrapped in a Syntax node, so we don't need LocVar for those.)
Instances
Functor Located Source # | |||||
FromJSON v => FromJSON (Located v) Source # | |||||
Defined in Swarm.Language.Syntax.Loc | |||||
ToJSON v => ToJSON (Located v) Source # | |||||
Data v => Data (Located v) Source # | |||||
Defined in Swarm.Language.Syntax.Loc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Located v -> c (Located v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Located v) # toConstr :: Located v -> Constr # dataTypeOf :: Located v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Located v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Located v)) # gmapT :: (forall b. Data b => b -> b) -> Located v -> Located v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Located v -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Located v -> r # gmapQ :: (forall d. Data d => d -> u) -> Located v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Located v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Located v -> m (Located v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Located v -> m (Located v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Located v -> m (Located v) # | |||||
Generic (Located v) Source # | |||||
Defined in Swarm.Language.Syntax.Loc Associated Types
| |||||
Show v => Show (Located v) Source # | |||||
Eq v => Eq (Located v) Source # | |||||
Ord v => Ord (Located v) Source # | |||||
Hashable v => Hashable (Located v) Source # | |||||
Defined in Swarm.Language.Syntax.Loc | |||||
type Rep (Located v) Source # | |||||
Defined in Swarm.Language.Syntax.Loc type Rep (Located v) = D1 ('MetaData "Located" "Swarm.Language.Syntax.Loc" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-lang" 'False) (C1 ('MetaCons "LV" 'PrefixI 'True) (S1 ('MetaSel ('Just "lvSrcLoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SrcLoc) :*: S1 ('MetaSel ('Just "lvVar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 v))) |