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 |
Derive constructor-field-type-based prisms generically.
Synopsis
- 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 ))
- derived :: Context a s => Prism' s a
- class GAsType (f :: Type -> Type ) (as :: Type ) where
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
.