traverse-code-0.1.1.1: General data structure lifting for Template Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Haskell.TH.TraverseCode

Synopsis

Documentation

class TraverseCode t where Source #

Containers supporting "traversal" in Code.

Minimal complete definition

Nothing

Methods

traverseCode :: Quote m => (a -> Code m b) -> t a -> Code m (t b) Source #

Given a container and a function to fill it with splices, produce a splice that will generate a container of their results.

default traverseCode :: (Quote m, GTraverseCode (Rep1 t), Generic1 t) => (a -> Code m b) -> t a -> Code m (t b) Source #

Instances

Instances details
TraverseCode ZipList Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> ZipList a -> Code m (ZipList b) Source #

TraverseCode Complex Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Complex a -> Code m (Complex b) Source #

TraverseCode Identity Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Identity a -> Code m (Identity b) Source #

TraverseCode First Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> First a -> Code m (First b) Source #

TraverseCode Last Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Last a -> Code m (Last b) Source #

TraverseCode Down Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Down a -> Code m (Down b) Source #

TraverseCode First Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> First a -> Code m (First b) Source #

TraverseCode Last Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Last a -> Code m (Last b) Source #

TraverseCode Max Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Max a -> Code m (Max b) Source #

TraverseCode Min Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Min a -> Code m (Min b) Source #

TraverseCode WrappedMonoid Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> WrappedMonoid a -> Code m (WrappedMonoid b) Source #

TraverseCode Dual Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Dual a -> Code m (Dual b) Source #

TraverseCode Product Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Product a -> Code m (Product b) Source #

TraverseCode Sum Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Sum a -> Code m (Sum b) Source #

TraverseCode Par1 Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Par1 a -> Code m (Par1 b) Source #

TraverseCode Digit Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Digit a -> Code m (Digit b) Source #

TraverseCode Elem Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Elem a -> Code m (Elem b) Source #

TraverseCode FingerTree Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> FingerTree a -> Code m (FingerTree b) Source #

TraverseCode Node Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Node a -> Code m (Node b) Source #

TraverseCode Seq Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Seq a -> Code m (Seq b) Source #

TraverseCode ViewL Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> ViewL a -> Code m (ViewL b) Source #

TraverseCode ViewR Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> ViewR a -> Code m (ViewR b) Source #

TraverseCode Tree Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Tree a -> Code m (Tree b) Source #

TraverseCode Array Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Array a -> Code m (Array b) Source #

TraverseCode SmallArray Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> SmallArray a -> Code m (SmallArray b) Source #

TraverseCode NonEmpty Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> NonEmpty a -> Code m (NonEmpty b) Source #

TraverseCode Maybe Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Maybe a -> Code m (Maybe b) Source #

TraverseCode Solo Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Solo a -> Code m (Solo b) Source #

TraverseCode [] Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> [a] -> Code m [b] Source #

TraverseCode m => TraverseCode (WrappedMonad m) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m0 :: Type -> Type) a b. Quote m0 => (a -> Code m0 b) -> WrappedMonad m a -> Code m0 (WrappedMonad m b) Source #

Lift a => TraverseCode (Either a) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b. Quote m => (a0 -> Code m b) -> Either a a0 -> Code m (Either a b) Source #

TraverseCode (Proxy :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Proxy a -> Code m (Proxy b) Source #

Lift a => TraverseCode (Arg a) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b. Quote m => (a0 -> Code m b) -> Arg a a0 -> Code m (Arg a b) Source #

(Ix i, Lift i) => TraverseCode (Array i) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Array i a -> Code m (Array i b) Source #

TraverseCode (U1 :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> U1 a -> Code m (U1 b) Source #

TraverseCode (V1 :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> V1 a -> Code m (V1 b) Source #

Lift a => TraverseCode ((,) a) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b. Quote m => (a0 -> Code m b) -> (a, a0) -> Code m (a, b) Source #

TraverseCode (p a) => TraverseCode (WrappedArrow p a) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b. Quote m => (a0 -> Code m b) -> WrappedArrow p a a0 -> Code m (WrappedArrow p a b) Source #

Lift a => TraverseCode (Const a :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b. Quote m => (a0 -> Code m b) -> Const a a0 -> Code m (Const a b) Source #

TraverseCode f => TraverseCode (Ap f) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Ap f a -> Code m (Ap f b) Source #

TraverseCode f => TraverseCode (Alt f) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Alt f a -> Code m (Alt f b) Source #

TraverseCode f => TraverseCode (Rec1 f) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Rec1 f a -> Code m (Rec1 f b) Source #

TraverseCode (URec Char :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> URec Char a -> Code m (URec Char b) Source #

TraverseCode (URec Double :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> URec Double a -> Code m (URec Double b) Source #

TraverseCode (URec Float :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> URec Float a -> Code m (URec Float b) Source #

TraverseCode (URec Int :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> URec Int a -> Code m (URec Int b) Source #

TraverseCode (URec Word :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> URec Word a -> Code m (URec Word b) Source #

(Lift a, Lift b) => TraverseCode ((,,) a b) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b0. Quote m => (a0 -> Code m b0) -> (a, b, a0) -> Code m (a, b, b0) Source #

(TraverseCode f, TraverseCode g) => TraverseCode (Product f g) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Product f g a -> Code m (Product f g b) Source #

(TraverseCode f, TraverseCode g) => TraverseCode (Sum f g) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Sum f g a -> Code m (Sum f g b) Source #

(TraverseCode f, TraverseCode g) => TraverseCode (f :*: g) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> (f :*: g) a -> Code m ((f :*: g) b) Source #

(TraverseCode f, TraverseCode g) => TraverseCode (f :+: g) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> (f :+: g) a -> Code m ((f :+: g) b) Source #

Lift a => TraverseCode (K1 i a :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b. Quote m => (a0 -> Code m b) -> K1 i a a0 -> Code m (K1 i a b) Source #

TraverseCode f => TraverseCode (MP1 m f) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m0 :: Type -> Type) a b. Quote m0 => (a -> Code m0 b) -> MP1 m f a -> Code m0 (MP1 m f b) Source #

(Lift a, Lift b, Lift c) => TraverseCode ((,,,) a b c) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b0. Quote m => (a0 -> Code m b0) -> (a, b, c, a0) -> Code m (a, b, c, b0) Source #

(TraverseCode f, TraverseCode g) => TraverseCode (Compose f g) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> Compose f g a -> Code m (Compose f g b) Source #

(TraverseCode f, TraverseCode g) => TraverseCode (f :.: g) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> (f :.: g) a -> Code m ((f :.: g) b) Source #

TraverseCode f => TraverseCode (M1 i c f) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> M1 i c f a -> Code m (M1 i c f b) Source #

(TraverseCode f, TraverseCode g) => TraverseCode (f :.: g) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a b. Quote m => (a -> Code m b) -> (f :.: g) a -> Code m ((f :.: g) b) Source #

(Lift a, Lift b, Lift c, Lift d) => TraverseCode ((,,,,) a b c d) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b0. Quote m => (a0 -> Code m b0) -> (a, b, c, d, a0) -> Code m (a, b, c, d, b0) Source #

(Lift a, Lift b, Lift c, Lift d, Lift e) => TraverseCode ((,,,,,) a b c d e) Source # 
Instance details

Defined in Language.Haskell.TH.TraverseCode

Methods

traverseCode :: forall (m :: Type -> Type) a0 b0. Quote m => (a0 -> Code m b0) -> (a, b, c, d, e, a0) -> Code m (a, b, c, d, e, b0) Source #

sequenceCode :: (TraverseCode t, Quote m) => t (Code m a) -> Code m (t a) Source #

Given a container of splices, produce a splice that will generate a container of their results.

genericTraverseCode :: (Quote m, GTraverseCode (Rep1 t), Generic1 t) => (a -> Code m b) -> t a -> Code m (t b) Source #

Like traverseCode, but using the Generics.Linear.Generic1 instance.

genericSequenceCode :: (Quote m, GTraverseCode (Rep1 t), Generic1 t) => t (Code m a) -> Code m (t a) Source #

Like sequenceCode, but using the Generics.Linear.Generic1 instance.