| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Schemas
Contents
Synopsis
- data Field = Field {
- fieldSchema :: Schema
- isRequired :: Bool
- data Schema where
- _Empty :: Prism' Schema ()
- _Union :: Prism' Schema (NonEmpty (Text, Schema))
- data Mismatch
- = MissingRecordField { }
- | InvalidEnumValue { }
- | InvalidConstructor { }
- | InvalidUnionValue { }
- | SchemaMismatch { }
- | ValueMismatch { }
- | EmptyAllOf
- | PrimValidatorMissing { }
- | PrimError { }
- | InvalidChoice {
- choiceNumber :: Int
- type Trace = [Text]
- isSubtypeOf :: Validators -> Schema -> Schema -> Either [(Trace, Mismatch)] (Value -> Value)
- versions :: Schema -> NonEmpty Schema
- coerce :: forall sub sup. (HasSchema sub, HasSchema sup) => Value -> Maybe Value
- finite :: Natural -> Schema -> Schema
- validate :: Validators -> Schema -> Value -> [(Trace, Mismatch)]
- validatorsFor :: forall a. HasSchema a => Validators
- type TypedSchema a = TypedSchemaFlex a a
- data TypedSchemaFlex from a
- class HasSchema a where
- schema :: TypedSchema a
- theSchema :: forall a. HasSchema a => Schema
- extractSchema :: TypedSchemaFlex from a -> Schema
- enum :: Eq a => (a -> Text) -> NonEmpty a -> TypedSchema a
- readShow :: (Read a, Show a) => TypedSchema a
- list :: IsList l => TypedSchema (Item l) -> TypedSchema l
- vector :: TypedSchema a -> TypedSchema (Vector a)
- stringMap :: TypedSchema a -> TypedSchema (HashMap Text a)
- viaJSON :: (FromJSON a, ToJSON a) => Text -> TypedSchema a
- viaIso :: Iso' a b -> TypedSchema a -> TypedSchema b
- class Key a where
- record :: RecordFields from a -> TypedSchemaFlex from a
- data RecordField from a
- data RecordFields from a
- field :: HasSchema a => Text -> (from -> a) -> RecordFields from a
- fieldWith :: TypedSchema a -> Text -> (from -> a) -> RecordFields from a
- fieldWith' :: TypedSchemaFlex from a -> Text -> RecordFields from a
- optField :: forall a from. HasSchema a => Text -> (from -> Maybe a) -> RecordFields from (Maybe a)
- optFieldWith :: forall a from. TypedSchemaFlex from (Maybe a) -> Text -> RecordFields from (Maybe a)
- optFieldEither :: forall a from e. HasSchema a => Text -> (from -> Either e a) -> e -> RecordFields from (Either e a)
- optFieldEitherWith :: TypedSchemaFlex from (Either e a) -> Text -> e -> RecordFields from (Either e a)
- optFieldGeneral :: forall a from. TypedSchemaFlex from a -> Text -> a -> RecordFields from a
- fieldName :: RecordField from a -> Text
- fieldNameL :: Lens' (RecordField from a) Text
- overFieldNames :: (Text -> Text) -> RecordFields from a -> RecordFields from a
- extractFields :: RecordFields from a -> [[(Text, Field)]]
- liftMaybe :: TypedSchemaFlex a b -> TypedSchemaFlex (Maybe a) (Maybe b)
- liftEither :: TypedSchemaFlex a b -> TypedSchemaFlex (Either c a) (Either c b)
- union :: NonEmpty (Text, TypedSchema a) -> TypedSchema a
- union' :: NonEmpty (UnionTag from) -> TypedSchema from
- data UnionTag from where
- UnionTag :: Text -> Prism' from b -> TypedSchema b -> UnionTag from
- alt :: HasSchema a => Text -> Prism' from a -> UnionTag from
- altWith :: TypedSchema a -> Text -> Prism' from a -> UnionTag from
- encode :: HasSchema a => a -> Value
- decode :: HasSchema a => Value -> Either [(Trace, DecodeError)] a
- encodeTo :: HasSchema a => Schema -> Maybe (a -> Value)
- decodeFrom :: HasSchema a => Schema -> Maybe (Value -> Either [(Trace, DecodeError)] a)
- encodeWith :: TypedSchemaFlex from a -> from -> Value
- decodeWith :: TypedSchemaFlex from a -> Value -> Either [(Trace, DecodeError)] a
- encodeToWith :: TypedSchema a -> Schema -> Maybe (a -> Value)
- decodeFromWith :: TypedSchema a -> Schema -> Maybe (Value -> Either [(Trace, DecodeError)] a)
- data DecodeError
- finiteValue :: Validators -> Natural -> Schema -> Value -> Value
- finiteEncode :: forall a. HasSchema a => Natural -> a -> Value
- class Profunctor (p :: Type -> Type -> Type) where
Schemas
Constructors
| Field | |
Fields
| |
Instances
| Eq Field Source # | |
| Show Field Source # | |
| Generic Field Source # | |
| HasSchema Field Source # | |
Defined in Schemas.Class Methods | |
| type Rep Field Source # | |
Defined in Schemas.Untyped type Rep Field = D1 (MetaData "Field" "Schemas.Untyped" "schemas-0.1.0.0-KElK5zNjEwOfUl5vxPHMe" False) (C1 (MetaCons "Field" PrefixI True) (S1 (MetaSel (Just "fieldSchema") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Schema) :*: S1 (MetaSel (Just "isRequired") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) | |
Constructors
| Array Schema | |
| StringMap Schema | |
| Enum (NonEmpty Text) | |
| Record (HashMap Text Field) | |
| AllOf (NonEmpty Schema) | Encoding and decoding work for all alternatives |
| OneOf (NonEmpty Schema) | Decoding works for all alternatives, encoding only for one |
| Prim Text | Carries the name of primitive type |
Instances
functions for working with schemas
isSubtypeOf :: Validators -> Schema -> Schema -> Either [(Trace, Mismatch)] (Value -> Value) Source #
sub returns a witness that isSubtypeOf supsub is a subtype of sup, i.e. a cast function sub -> sup
Array Bool `isSubtypeOf` Bool
Just function
> Record [("a", Bool)] isSubtypeOf Record [("a", Number)]
Nothing
versions :: Schema -> NonEmpty Schema Source #
Flattens alternatives. Returns a schema without AllOf constructors
coerce :: forall sub sup. (HasSchema sub, HasSchema sup) => Value -> Maybe Value Source #
Coerce from sub to supReturns Nothing if sub is not a subtype of sup
finite :: Natural -> Schema -> Schema Source #
Ensure that a Schema is finite by enforcing a max depth.
The result is guaranteed to be a supertype of the input.
validate :: Validators -> Schema -> Value -> [(Trace, Mismatch)] Source #
Structural validation of a JSON value against a schema Ignores extraneous fields in records
validatorsFor :: forall a. HasSchema a => Validators Source #
Typed schemas
type TypedSchema a = TypedSchemaFlex a a Source #
data TypedSchemaFlex from a Source #
TypedSchemaFlex enc dec is a schema for encoding to enc and decoding to dec.
Usually we want enc and dec to be the same type but this flexibility comes in handy
when composing typed schemas.
Instances
class HasSchema a where Source #
Methods
schema :: TypedSchema a Source #
Instances
extractSchema :: TypedSchemaFlex from a -> Schema Source #
Extract an untyped schema that can be serialized
Construction
list :: IsList l => TypedSchema (Item l) -> TypedSchema l Source #
vector :: TypedSchema a -> TypedSchema (Vector a) Source #
stringMap :: TypedSchema a -> TypedSchema (HashMap Text a) Source #
viaIso :: Iso' a b -> TypedSchema a -> TypedSchema b Source #
Applicative record definition
record :: RecordFields from a -> TypedSchemaFlex from a Source #
Define a record schema using applicative syntax
data RecordField from a Source #
Instances
| Profunctor RecordField Source # | |
Defined in Schemas.Internal Methods dimap :: (a -> b) -> (c -> d) -> RecordField b c -> RecordField a d # lmap :: (a -> b) -> RecordField b c -> RecordField a c # rmap :: (b -> c) -> RecordField a b -> RecordField a c # (#.) :: Coercible c b => q b c -> RecordField a b -> RecordField a c # (.#) :: Coercible b a => RecordField b c -> q a b -> RecordField a c # | |
data RecordFields from a Source #
Instances
fieldWith :: TypedSchema a -> Text -> (from -> a) -> RecordFields from a Source #
fieldWith' :: TypedSchemaFlex from a -> Text -> RecordFields from a Source #
optField :: forall a from. HasSchema a => Text -> (from -> Maybe a) -> RecordFields from (Maybe a) Source #
optFieldWith :: forall a from. TypedSchemaFlex from (Maybe a) -> Text -> RecordFields from (Maybe a) Source #
A generalized version of optField. Does not handle infinite/circular data.
optFieldEither :: forall a from e. HasSchema a => Text -> (from -> Either e a) -> e -> RecordFields from (Either e a) Source #
optFieldEitherWith :: TypedSchemaFlex from (Either e a) -> Text -> e -> RecordFields from (Either e a) Source #
A generalized version of optFieldEither. Does not handle infinite/circular data
optFieldGeneral :: forall a from. TypedSchemaFlex from a -> Text -> a -> RecordFields from a Source #
fieldName :: RecordField from a -> Text Source #
fieldNameL :: Lens' (RecordField from a) Text Source #
overFieldNames :: (Text -> Text) -> RecordFields from a -> RecordFields from a Source #
extractFields :: RecordFields from a -> [[(Text, Field)]] Source #
Extract all the field groups (from alternatives) in the record
liftMaybe :: TypedSchemaFlex a b -> TypedSchemaFlex (Maybe a) (Maybe b) Source #
Use this to build schemas for optFieldWith. The resulting schema is empty for the Nothing case
liftEither :: TypedSchemaFlex a b -> TypedSchemaFlex (Either c a) (Either c b) Source #
Use this to build schemas for optFieldEitherWith. The resulting schema is empty for the Left case
Unions
union :: NonEmpty (Text, TypedSchema a) -> TypedSchema a Source #
data UnionTag from where Source #
Constructors
| UnionTag :: Text -> Prism' from b -> TypedSchema b -> UnionTag from |
Encoding
decodeFrom :: HasSchema a => Schema -> Maybe (Value -> Either [(Trace, DecodeError)] a) Source #
encodeWith :: TypedSchemaFlex from a -> from -> Value Source #
Given a value and its typed schema, produce a JSON record using the RecordFields
decodeWith :: TypedSchemaFlex from a -> Value -> Either [(Trace, DecodeError)] a Source #
Given a JSON Value and a typed schema, extract a Haskell value
encodeToWith :: TypedSchema a -> Schema -> Maybe (a -> Value) Source #
decodeFromWith :: TypedSchema a -> Schema -> Maybe (Value -> Either [(Trace, DecodeError)] a) Source #
data DecodeError Source #
Constructors
| VE Mismatch | |
| TriedAndFailed |
Instances
| Eq DecodeError Source # | |
Defined in Schemas.Internal | |
| Show DecodeError Source # | |
Defined in Schemas.Internal Methods showsPrec :: Int -> DecodeError -> ShowS # show :: DecodeError -> String # showList :: [DecodeError] -> ShowS # | |
working with recursive schemas
finiteValue :: Validators -> Natural -> Schema -> Value -> Value Source #
Ensure that a Value is finite by enforcing a max depth in a schema preserving way
finiteEncode :: forall a. HasSchema a => Natural -> a -> Value Source #
Encode a value into a finite representation by enforcing a max depth
Reexports
class Profunctor (p :: Type -> Type -> Type) where #
Formally, the class Profunctor represents a profunctor
from Hask -> Hask.
Intuitively it is a bifunctor where the first argument is contravariant and the second argument is covariant.
You can define a Profunctor by either defining dimap or by defining both
lmap and rmap.
If you supply dimap, you should ensure that:
dimapidid≡id
If you supply lmap and rmap, ensure:
lmapid≡idrmapid≡id
If you supply both, you should also ensure:
dimapf g ≡lmapf.rmapg
These ensure by parametricity:
dimap(f.g) (h.i) ≡dimapg h.dimapf ilmap(f.g) ≡lmapg.lmapfrmap(f.g) ≡rmapf.rmapg
Instances
| Profunctor ReifiedGetter | |
Defined in Control.Lens.Reified Methods dimap :: (a -> b) -> (c -> d) -> ReifiedGetter b c -> ReifiedGetter a d # lmap :: (a -> b) -> ReifiedGetter b c -> ReifiedGetter a c # rmap :: (b -> c) -> ReifiedGetter a b -> ReifiedGetter a c # (#.) :: Coercible c b => q b c -> ReifiedGetter a b -> ReifiedGetter a c # (.#) :: Coercible b a => ReifiedGetter b c -> q a b -> ReifiedGetter a c # | |
| Profunctor ReifiedFold | |
Defined in Control.Lens.Reified Methods dimap :: (a -> b) -> (c -> d) -> ReifiedFold b c -> ReifiedFold a d # lmap :: (a -> b) -> ReifiedFold b c -> ReifiedFold a c # rmap :: (b -> c) -> ReifiedFold a b -> ReifiedFold a c # (#.) :: Coercible c b => q b c -> ReifiedFold a b -> ReifiedFold a c # (.#) :: Coercible b a => ReifiedFold b c -> q a b -> ReifiedFold a c # | |
| Profunctor RecordFields Source # | |
Defined in Schemas.Internal Methods dimap :: (a -> b) -> (c -> d) -> RecordFields b c -> RecordFields a d # lmap :: (a -> b) -> RecordFields b c -> RecordFields a c # rmap :: (b -> c) -> RecordFields a b -> RecordFields a c # (#.) :: Coercible c b => q b c -> RecordFields a b -> RecordFields a c # (.#) :: Coercible b a => RecordFields b c -> q a b -> RecordFields a c # | |
| Profunctor RecordField Source # | |
Defined in Schemas.Internal Methods dimap :: (a -> b) -> (c -> d) -> RecordField b c -> RecordField a d # lmap :: (a -> b) -> RecordField b c -> RecordField a c # rmap :: (b -> c) -> RecordField a b -> RecordField a c # (#.) :: Coercible c b => q b c -> RecordField a b -> RecordField a c # (.#) :: Coercible b a => RecordField b c -> q a b -> RecordField a c # | |
| Profunctor TypedSchemaFlex Source # | |
Defined in Schemas.Internal Methods dimap :: (a -> b) -> (c -> d) -> TypedSchemaFlex b c -> TypedSchemaFlex a d # lmap :: (a -> b) -> TypedSchemaFlex b c -> TypedSchemaFlex a c # rmap :: (b -> c) -> TypedSchemaFlex a b -> TypedSchemaFlex a c # (#.) :: Coercible c b => q b c -> TypedSchemaFlex a b -> TypedSchemaFlex a c # (.#) :: Coercible b a => TypedSchemaFlex b c -> q a b -> TypedSchemaFlex a c # | |
| Monad m => Profunctor (Kleisli m) | |
Defined in Data.Profunctor.Unsafe Methods dimap :: (a -> b) -> (c -> d) -> Kleisli m b c -> Kleisli m a d # lmap :: (a -> b) -> Kleisli m b c -> Kleisli m a c # rmap :: (b -> c) -> Kleisli m a b -> Kleisli m a c # (#.) :: Coercible c b => q b c -> Kleisli m a b -> Kleisli m a c # (.#) :: Coercible b a => Kleisli m b c -> q a b -> Kleisli m a c # | |
| Profunctor (ReifiedIndexedGetter i) | |
Defined in Control.Lens.Reified Methods dimap :: (a -> b) -> (c -> d) -> ReifiedIndexedGetter i b c -> ReifiedIndexedGetter i a d # lmap :: (a -> b) -> ReifiedIndexedGetter i b c -> ReifiedIndexedGetter i a c # rmap :: (b -> c) -> ReifiedIndexedGetter i a b -> ReifiedIndexedGetter i a c # (#.) :: Coercible c b => q b c -> ReifiedIndexedGetter i a b -> ReifiedIndexedGetter i a c # (.#) :: Coercible b a => ReifiedIndexedGetter i b c -> q a b -> ReifiedIndexedGetter i a c # | |
| Profunctor (ReifiedIndexedFold i) | |
Defined in Control.Lens.Reified Methods dimap :: (a -> b) -> (c -> d) -> ReifiedIndexedFold i b c -> ReifiedIndexedFold i a d # lmap :: (a -> b) -> ReifiedIndexedFold i b c -> ReifiedIndexedFold i a c # rmap :: (b -> c) -> ReifiedIndexedFold i a b -> ReifiedIndexedFold i a c # (#.) :: Coercible c b => q b c -> ReifiedIndexedFold i a b -> ReifiedIndexedFold i a c # (.#) :: Coercible b a => ReifiedIndexedFold i b c -> q a b -> ReifiedIndexedFold i a c # | |
| Profunctor (Indexed i) | |
Defined in Control.Lens.Internal.Indexed Methods dimap :: (a -> b) -> (c -> d) -> Indexed i b c -> Indexed i a d # lmap :: (a -> b) -> Indexed i b c -> Indexed i a c # rmap :: (b -> c) -> Indexed i a b -> Indexed i a c # (#.) :: Coercible c b => q b c -> Indexed i a b -> Indexed i a c # (.#) :: Coercible b a => Indexed i b c -> q a b -> Indexed i a c # | |
| Profunctor p => Profunctor (CofreeMapping p) | |
Defined in Data.Profunctor.Mapping Methods dimap :: (a -> b) -> (c -> d) -> CofreeMapping p b c -> CofreeMapping p a d # lmap :: (a -> b) -> CofreeMapping p b c -> CofreeMapping p a c # rmap :: (b -> c) -> CofreeMapping p a b -> CofreeMapping p a c # (#.) :: Coercible c b => q b c -> CofreeMapping p a b -> CofreeMapping p a c # (.#) :: Coercible b a => CofreeMapping p b c -> q a b -> CofreeMapping p a c # | |
| Profunctor (FreeMapping p) | |
Defined in Data.Profunctor.Mapping Methods dimap :: (a -> b) -> (c -> d) -> FreeMapping p b c -> FreeMapping p a d # lmap :: (a -> b) -> FreeMapping p b c -> FreeMapping p a c # rmap :: (b -> c) -> FreeMapping p a b -> FreeMapping p a c # (#.) :: Coercible c b => q b c -> FreeMapping p a b -> FreeMapping p a c # (.#) :: Coercible b a => FreeMapping p b c -> q a b -> FreeMapping p a c # | |
| Profunctor p => Profunctor (TambaraSum p) | |
Defined in Data.Profunctor.Choice Methods dimap :: (a -> b) -> (c -> d) -> TambaraSum p b c -> TambaraSum p a d # lmap :: (a -> b) -> TambaraSum p b c -> TambaraSum p a c # rmap :: (b -> c) -> TambaraSum p a b -> TambaraSum p a c # (#.) :: Coercible c b => q b c -> TambaraSum p a b -> TambaraSum p a c # (.#) :: Coercible b a => TambaraSum p b c -> q a b -> TambaraSum p a c # | |
| Profunctor (PastroSum p) | |
Defined in Data.Profunctor.Choice Methods dimap :: (a -> b) -> (c -> d) -> PastroSum p b c -> PastroSum p a d # lmap :: (a -> b) -> PastroSum p b c -> PastroSum p a c # rmap :: (b -> c) -> PastroSum p a b -> PastroSum p a c # (#.) :: Coercible c b => q b c -> PastroSum p a b -> PastroSum p a c # (.#) :: Coercible b a => PastroSum p b c -> q a b -> PastroSum p a c # | |
| Profunctor (CotambaraSum p) | |
Defined in Data.Profunctor.Choice Methods dimap :: (a -> b) -> (c -> d) -> CotambaraSum p b c -> CotambaraSum p a d # lmap :: (a -> b) -> CotambaraSum p b c -> CotambaraSum p a c # rmap :: (b -> c) -> CotambaraSum p a b -> CotambaraSum p a c # (#.) :: Coercible c b => q b c -> CotambaraSum p a b -> CotambaraSum p a c # (.#) :: Coercible b a => CotambaraSum p b c -> q a b -> CotambaraSum p a c # | |
| Profunctor (CopastroSum p) | |
Defined in Data.Profunctor.Choice Methods dimap :: (a -> b) -> (c -> d) -> CopastroSum p b c -> CopastroSum p a d # lmap :: (a -> b) -> CopastroSum p b c -> CopastroSum p a c # rmap :: (b -> c) -> CopastroSum p a b -> CopastroSum p a c # (#.) :: Coercible c b => q b c -> CopastroSum p a b -> CopastroSum p a c # (.#) :: Coercible b a => CopastroSum p b c -> q a b -> CopastroSum p a c # | |
| Profunctor p => Profunctor (Closure p) | |
Defined in Data.Profunctor.Closed Methods dimap :: (a -> b) -> (c -> d) -> Closure p b c -> Closure p a d # lmap :: (a -> b) -> Closure p b c -> Closure p a c # rmap :: (b -> c) -> Closure p a b -> Closure p a c # (#.) :: Coercible c b => q b c -> Closure p a b -> Closure p a c # (.#) :: Coercible b a => Closure p b c -> q a b -> Closure p a c # | |
| Profunctor (Environment p) | |
Defined in Data.Profunctor.Closed Methods dimap :: (a -> b) -> (c -> d) -> Environment p b c -> Environment p a d # lmap :: (a -> b) -> Environment p b c -> Environment p a c # rmap :: (b -> c) -> Environment p a b -> Environment p a c # (#.) :: Coercible c b => q b c -> Environment p a b -> Environment p a c # (.#) :: Coercible b a => Environment p b c -> q a b -> Environment p a c # | |
| Profunctor p => Profunctor (Tambara p) | |
Defined in Data.Profunctor.Strong Methods dimap :: (a -> b) -> (c -> d) -> Tambara p b c -> Tambara p a d # lmap :: (a -> b) -> Tambara p b c -> Tambara p a c # rmap :: (b -> c) -> Tambara p a b -> Tambara p a c # (#.) :: Coercible c b => q b c -> Tambara p a b -> Tambara p a c # (.#) :: Coercible b a => Tambara p b c -> q a b -> Tambara p a c # | |
| Profunctor (Pastro p) | |
Defined in Data.Profunctor.Strong | |
| Profunctor (Cotambara p) | |
Defined in Data.Profunctor.Strong Methods dimap :: (a -> b) -> (c -> d) -> Cotambara p b c -> Cotambara p a d # lmap :: (a -> b) -> Cotambara p b c -> Cotambara p a c # rmap :: (b -> c) -> Cotambara p a b -> Cotambara p a c # (#.) :: Coercible c b => q b c -> Cotambara p a b -> Cotambara p a c # (.#) :: Coercible b a => Cotambara p b c -> q a b -> Cotambara p a c # | |
| Profunctor (Copastro p) | |
Defined in Data.Profunctor.Strong Methods dimap :: (a -> b) -> (c -> d) -> Copastro p b c -> Copastro p a d # lmap :: (a -> b) -> Copastro p b c -> Copastro p a c # rmap :: (b -> c) -> Copastro p a b -> Copastro p a c # (#.) :: Coercible c b => q b c -> Copastro p a b -> Copastro p a c # (.#) :: Coercible b a => Copastro p b c -> q a b -> Copastro p a c # | |
| Functor f => Profunctor (Star f) | |
Defined in Data.Profunctor.Types | |
| Functor f => Profunctor (Costar f) | |
Defined in Data.Profunctor.Types | |
| Arrow p => Profunctor (WrappedArrow p) | |
Defined in Data.Profunctor.Types Methods dimap :: (a -> b) -> (c -> d) -> WrappedArrow p b c -> WrappedArrow p a d # lmap :: (a -> b) -> WrappedArrow p b c -> WrappedArrow p a c # rmap :: (b -> c) -> WrappedArrow p a b -> WrappedArrow p a c # (#.) :: Coercible c b => q b c -> WrappedArrow p a b -> WrappedArrow p a c # (.#) :: Coercible b a => WrappedArrow p b c -> q a b -> WrappedArrow p a c # | |
| Profunctor (Forget r) | |
Defined in Data.Profunctor.Types | |
| Profunctor (Tagged :: Type -> Type -> Type) | |
Defined in Data.Profunctor.Unsafe | |
| Profunctor ((->) :: Type -> Type -> Type) | |
| Functor w => Profunctor (Cokleisli w) | |
Defined in Data.Profunctor.Unsafe Methods dimap :: (a -> b) -> (c -> d) -> Cokleisli w b c -> Cokleisli w a d # lmap :: (a -> b) -> Cokleisli w b c -> Cokleisli w a c # rmap :: (b -> c) -> Cokleisli w a b -> Cokleisli w a c # (#.) :: Coercible c b => q b c -> Cokleisli w a b -> Cokleisli w a c # (.#) :: Coercible b a => Cokleisli w b c -> q a b -> Cokleisli w a c # | |
| Profunctor (Market a b) | |
Defined in Control.Lens.Internal.Prism Methods dimap :: (a0 -> b0) -> (c -> d) -> Market a b b0 c -> Market a b a0 d # lmap :: (a0 -> b0) -> Market a b b0 c -> Market a b a0 c # rmap :: (b0 -> c) -> Market a b a0 b0 -> Market a b a0 c # (#.) :: Coercible c b0 => q b0 c -> Market a b a0 b0 -> Market a b a0 c # (.#) :: Coercible b0 a0 => Market a b b0 c -> q a0 b0 -> Market a b a0 c # | |
| Profunctor (Exchange a b) | |
Defined in Control.Lens.Internal.Iso Methods dimap :: (a0 -> b0) -> (c -> d) -> Exchange a b b0 c -> Exchange a b a0 d # lmap :: (a0 -> b0) -> Exchange a b b0 c -> Exchange a b a0 c # rmap :: (b0 -> c) -> Exchange a b a0 b0 -> Exchange a b a0 c # (#.) :: Coercible c b0 => q b0 c -> Exchange a b a0 b0 -> Exchange a b a0 c # (.#) :: Coercible b0 a0 => Exchange a b b0 c -> q a0 b0 -> Exchange a b a0 c # | |
| (Profunctor p, Profunctor q) => Profunctor (Procompose p q) | |
Defined in Data.Profunctor.Composition Methods dimap :: (a -> b) -> (c -> d) -> Procompose p q b c -> Procompose p q a d # lmap :: (a -> b) -> Procompose p q b c -> Procompose p q a c # rmap :: (b -> c) -> Procompose p q a b -> Procompose p q a c # (#.) :: Coercible c b => q0 b c -> Procompose p q a b -> Procompose p q a c # (.#) :: Coercible b a => Procompose p q b c -> q0 a b -> Procompose p q a c # | |
| (Profunctor p, Profunctor q) => Profunctor (Rift p q) | |
Defined in Data.Profunctor.Composition Methods dimap :: (a -> b) -> (c -> d) -> Rift p q b c -> Rift p q a d # lmap :: (a -> b) -> Rift p q b c -> Rift p q a c # rmap :: (b -> c) -> Rift p q a b -> Rift p q a c # (#.) :: Coercible c b => q0 b c -> Rift p q a b -> Rift p q a c # (.#) :: Coercible b a => Rift p q b c -> q0 a b -> Rift p q a c # | |
| Functor f => Profunctor (Joker f :: Type -> Type -> Type) | |
Defined in Data.Profunctor.Unsafe | |
| Contravariant f => Profunctor (Clown f :: Type -> Type -> Type) | |
Defined in Data.Profunctor.Unsafe | |
| (Profunctor p, Profunctor q) => Profunctor (Sum p q) | |
Defined in Data.Profunctor.Unsafe | |
| (Profunctor p, Profunctor q) => Profunctor (Product p q) | |
Defined in Data.Profunctor.Unsafe Methods dimap :: (a -> b) -> (c -> d) -> Product p q b c -> Product p q a d # lmap :: (a -> b) -> Product p q b c -> Product p q a c # rmap :: (b -> c) -> Product p q a b -> Product p q a c # (#.) :: Coercible c b => q0 b c -> Product p q a b -> Product p q a c # (.#) :: Coercible b a => Product p q b c -> q0 a b -> Product p q a c # | |
| (Functor f, Profunctor p) => Profunctor (Tannen f p) | |
Defined in Data.Profunctor.Unsafe Methods dimap :: (a -> b) -> (c -> d) -> Tannen f p b c -> Tannen f p a d # lmap :: (a -> b) -> Tannen f p b c -> Tannen f p a c # rmap :: (b -> c) -> Tannen f p a b -> Tannen f p a c # (#.) :: Coercible c b => q b c -> Tannen f p a b -> Tannen f p a c # (.#) :: Coercible b a => Tannen f p b c -> q a b -> Tannen f p a c # | |
| (Profunctor p, Functor f, Functor g) => Profunctor (Biff p f g) | |
Defined in Data.Profunctor.Unsafe Methods dimap :: (a -> b) -> (c -> d) -> Biff p f g b c -> Biff p f g a d # lmap :: (a -> b) -> Biff p f g b c -> Biff p f g a c # rmap :: (b -> c) -> Biff p f g a b -> Biff p f g a c # (#.) :: Coercible c b => q b c -> Biff p f g a b -> Biff p f g a c # (.#) :: Coercible b a => Biff p f g b c -> q a b -> Biff p f g a c # | |