Copyright | (C) 2019 Csongor Kiss |
---|---|
License | BSD3 |
Maintainer | Csongor Kiss <kiss.csongor.kiss@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Derive traversals over type parameters
Documentation
class HasParam (p :: Nat) s t a b | p t a -> s, p s b -> t, p s -> a, p t -> b where Source #
param :: Applicative g => (a -> g b) -> s -> g t Source #
Instances
(GenericN s, GenericN t, Defined (Rep s) (NoGeneric s ((Text "arising from a generic traversal of the type parameter at position " :<>: QuoteType n) ': ((((Text "of type " :<>: QuoteType a) :<>: Text " in ") :<>: QuoteType s) ': ([] :: [ErrorMessage])))) (), s ~ Infer t (P n b PTag) a, t ~ Infer s (P n a PTag) b, Error (ArgCount s <=? n) n (ArgCount s) s, a ~ (ArgAt s n :: Type), b ~ (ArgAt t n :: Type), GHasParam n (RepN s) (RepN t) a b) => HasParam n s t a b Source # | |
Defined in Data.Generics.Product.Param param :: Applicative g => (a -> g b) -> s -> g t Source # | |
HasParam p (Void1 a) (Void1 b) a b Source # | |
Defined in Data.Generics.Product.Param |