generic-lens-core-2.2.1.0: Generically derive traversals, lenses and prisms.
Copyright (C) 2020 Csongor Kiss
License BSD3
Maintainer Csongor Kiss <kiss.csongor.kiss@gmail.com>
Stability experimental
Portability non-portable
Safe Haskell None
Language Haskell2010

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 #

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 #