Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data AList t a = AList {}
- fromList :: Spanned (t a) => a -> [t a] -> AList t a
- fromList' :: Spanned (t a) => a -> [t a] -> Maybe (AList t a)
- fromReverseList :: Spanned (t ()) => [t ()] -> AList t ()
- fromReverseList' :: Spanned (t ()) => [t ()] -> Maybe (AList t ())
- aCons :: t a -> AList t a -> AList t a
- aEmpty :: a -> SrcSpan -> AList t a
- aReverse :: AList t a -> AList t a
- aStrip :: AList t a -> [t a]
- aStrip' :: Maybe (AList t a) -> [t a]
- aMap :: (t a -> r a) -> AList t a -> AList r a
- data ATuple t1 t2 a = ATuple {
- atupleAnno :: a
- atupleSpan :: SrcSpan
- atupleFst :: t1 a
- atupleSnd :: t2 a
Documentation
A location-tagged list of t a
s (t
decorated with an a
annotation).
The AST is polymorphic on some type a
, which is used for arbitrary
annotations. Since many AST nodes use lists (e.g. executable statements,
declarations), we define a dedicated annotated list type to reuse.
Note that the list itself also holds an a
annotation.
Instances
Functor t => Functor (AList t) Source # | |
Annotated (AList t) Source # | |
Defined in Language.Fortran.AST.AList getAnnotation :: AList t a -> a Source # setAnnotation :: a -> AList t a -> AList t a Source # modifyAnnotation :: (a -> a) -> AList t a -> AList t a Source # | |
(Out a, Out (t a)) => Out (AList t a) Source # | |
(Typeable t, Data a, Data (t a)) => Data (AList t a) Source # | |
Defined in Language.Fortran.AST.AList gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AList t a -> c (AList t a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AList t a) # toConstr :: AList t a -> Constr # dataTypeOf :: AList t a -> DataType # dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (AList t a)) # dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (AList t a)) # gmapT :: (forall b. Data b => b -> b) -> AList t a -> AList t a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AList t a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AList t a -> r # gmapQ :: (forall d. Data d => d -> u) -> AList t a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AList t a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AList t a -> m (AList t a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AList t a -> m (AList t a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AList t a -> m (AList t a) # | |
Generic (AList t a) Source # | |
(Show a, Show (t a)) => Show (AList t a) Source # | |
(NFData a, NFData (t a)) => NFData (AList t a) Source # | |
Defined in Language.Fortran.AST.AList | |
Pretty (e a) => Pretty (AList e a) Source # | |
Defined in Language.Fortran.PrettyPrint | |
Spanned (AList t a) Source # | |
(Eq a, Eq (t a)) => Eq (AList t a) Source # | |
FirstParameter (AList t a) a Source # | |
Defined in Language.Fortran.AST.AList getFirstParameter :: AList t a -> a Source # setFirstParameter :: a -> AList t a -> AList t a Source # | |
SecondParameter (AList t a) SrcSpan Source # | |
Defined in Language.Fortran.AST.AList | |
type Rep (AList t a) Source # | |
Defined in Language.Fortran.AST.AList type Rep (AList t a) = D1 ('MetaData "AList" "Language.Fortran.AST.AList" "fortran-src-0.16.1-inplace" 'False) (C1 ('MetaCons "AList" 'PrefixI 'True) (S1 ('MetaSel ('Just "alistAnno") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Just "alistSpan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpan) :*: S1 ('MetaSel ('Just "alistList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [t a])))) |
fromList' :: Spanned (t a) => a -> [t a] -> Maybe (AList t a) Source #
Convert a list to an AList
, returning Nothing iff the list is empty.
fromReverseList :: Spanned (t ()) => [t ()] -> AList t () Source #
ATuple | |
|
Instances
(Functor t1, Functor t2) => Functor (ATuple t1 t2) Source # | |
(Out a, Out (t1 a), Out (t2 a)) => Out (ATuple t1 t2 a) Source # | |
(Typeable t1, Typeable t2, Data a, Data (t1 a), Data (t2 a)) => Data (ATuple t1 t2 a) Source # | |
Defined in Language.Fortran.AST.AList gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ATuple t1 t2 a -> c (ATuple t1 t2 a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ATuple t1 t2 a) # toConstr :: ATuple t1 t2 a -> Constr # dataTypeOf :: ATuple t1 t2 a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ATuple t1 t2 a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ATuple t1 t2 a)) # gmapT :: (forall b. Data b => b -> b) -> ATuple t1 t2 a -> ATuple t1 t2 a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ATuple t1 t2 a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ATuple t1 t2 a -> r # gmapQ :: (forall d. Data d => d -> u) -> ATuple t1 t2 a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ATuple t1 t2 a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ATuple t1 t2 a -> m (ATuple t1 t2 a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ATuple t1 t2 a -> m (ATuple t1 t2 a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ATuple t1 t2 a -> m (ATuple t1 t2 a) # | |
Generic (ATuple t1 t2 a) Source # | |
(Show a, Show (t1 a), Show (t2 a)) => Show (ATuple t1 t2 a) Source # | |
(NFData a, NFData (t1 a), NFData (t2 a)) => NFData (ATuple t1 t2 a) Source # | |
Defined in Language.Fortran.AST.AList | |
(Pretty (t1 a), Pretty (t2 a)) => Pretty (ATuple t1 t2 a) Source # | |
Defined in Language.Fortran.PrettyPrint | |
Spanned (ATuple t1 t2 a) Source # | |
(Eq a, Eq (t1 a), Eq (t2 a)) => Eq (ATuple t1 t2 a) Source # | |
FirstParameter (ATuple t1 t2 a) a Source # | |
Defined in Language.Fortran.AST.AList getFirstParameter :: ATuple t1 t2 a -> a Source # setFirstParameter :: a -> ATuple t1 t2 a -> ATuple t1 t2 a Source # | |
SecondParameter (ATuple t1 t2 a) SrcSpan Source # | |
Defined in Language.Fortran.AST.AList | |
type Rep (ATuple t1 t2 a) Source # | |
Defined in Language.Fortran.AST.AList type Rep (ATuple t1 t2 a) = D1 ('MetaData "ATuple" "Language.Fortran.AST.AList" "fortran-src-0.16.1-inplace" 'False) (C1 ('MetaCons "ATuple" 'PrefixI 'True) ((S1 ('MetaSel ('Just "atupleAnno") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "atupleSpan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpan)) :*: (S1 ('MetaSel ('Just "atupleFst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (t1 a)) :*: S1 ('MetaSel ('Just "atupleSnd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (t2 a))))) |