| License | BSD-3-Clause |
|---|---|
| Safe Haskell | Safe-Inferred |
| 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 # | |
| Show SrcLoc Source # | |
| Eq SrcLoc Source # | |
| Ord SrcLoc Source # | |
| type Rep SrcLoc Source # | |
Defined in Swarm.Language.Syntax.Loc type Rep SrcLoc = D1 ('MetaData "SrcLoc" "Swarm.Language.Syntax.Loc" "swarm-0.6.0.0-ERx1HMcRMba59aI2b6aNrS-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
| FromJSON LocVar Source # | |
Defined in Swarm.Language.Syntax.Loc | |
| ToJSON LocVar Source # | |
| Data LocVar 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) -> LocVar -> c LocVar # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LocVar # toConstr :: LocVar -> Constr # dataTypeOf :: LocVar -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LocVar) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LocVar) # gmapT :: (forall b. Data b => b -> b) -> LocVar -> LocVar # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LocVar -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LocVar -> r # gmapQ :: (forall d. Data d => d -> u) -> LocVar -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LocVar -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LocVar -> m LocVar # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LocVar -> m LocVar # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LocVar -> m LocVar # | |
| Generic LocVar Source # | |
| Show LocVar Source # | |
| Eq LocVar Source # | |
| Ord LocVar Source # | |
| type Rep LocVar Source # | |
Defined in Swarm.Language.Syntax.Loc type Rep LocVar = D1 ('MetaData "LocVar" "Swarm.Language.Syntax.Loc" "swarm-0.6.0.0-ERx1HMcRMba59aI2b6aNrS-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 Var))) | |