generic-lens-core-2.2.1.0: Generically derive traversals, lenses and prisms.
Copyright(C) 2020 Csongor Kiss
LicenseBSD3
MaintainerCsongor Kiss <kiss.csongor.kiss@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Generics.Sum.Internal.Typed

Description

Derive constructor-field-type-based prisms generically.

Synopsis

Documentation

type Context a s = (Generic s, ErrorUnlessOne a s (CollectPartialType (TupleToList a) (Rep s)), GAsType (Rep s) a, Defined (Rep s) (NoGeneric s '['Text "arising from a generic prism focusing on a constructor of type " :<>: QuoteType a]) (() :: Constraint)) Source #

derived :: Context a s => Prism' s a Source #

class GAsType (f :: Type -> Type) (as :: Type) where Source #

As AsType but over generic representations as defined by GHC.Generics.

Methods

_GTyped :: Prism (f x) (f x) as as Source #

Instances

Instances details
GSumAsType (HasPartialTypeP (TupleToList a) l) l r a => GAsType (l :+: r) a Source # 
Instance details

Defined in Data.Generics.Sum.Internal.Typed

Methods

_GTyped :: Prism ((l :+: r) x) ((l :+: r) x) a a Source #

GAsType f a => GAsType (M1 D meta f) a Source # 
Instance details

Defined in Data.Generics.Sum.Internal.Typed

Methods

_GTyped :: Prism (M1 D meta f x) (M1 D meta f x) a a Source #

(GIsList f f as as, ListTuple a a as as) => GAsType (M1 C meta f) a Source # 
Instance details

Defined in Data.Generics.Sum.Internal.Typed

Methods

_GTyped :: Prism (M1 C meta f x) (M1 C meta f x) a a Source #