liqwid-plutarch-extra-3.21.1: A collection of Plutarch extras from Liqwid Labs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Plutarch.Extra.Profunctor

Synopsis

Documentation

class PProfunctor (p :: (S -> Type) -> (S -> Type) -> S -> Type) where Source #

Since: 1.0.0

Minimal complete definition

pdimap | plmap, prmap

Associated Types

type PContraSubcategory p :: (S -> Type) -> Constraint Source #

type PCoSubcategory p :: (S -> Type) -> Constraint Source #

Methods

pdimap :: forall (a :: S -> Type) (b :: S -> Type) (c :: S -> Type) (d :: S -> Type) (s :: S). (PContraSubcategory p a, PContraSubcategory p b, PCoSubcategory p c, PCoSubcategory p d) => Term s ((a :--> b) :--> ((c :--> d) :--> (p b c :--> p a d))) Source #

plmap :: forall (a :: S -> Type) (b :: S -> Type) (c :: S -> Type) (s :: S). (PContraSubcategory p a, PContraSubcategory p b, PCoSubcategory p c) => Term s ((a :--> b) :--> (p b c :--> p a c)) Source #

prmap :: forall (a :: S -> Type) (c :: S -> Type) (d :: S -> Type) (s :: S). (PContraSubcategory p a, PCoSubcategory p c, PCoSubcategory p d) => Term s ((c :--> d) :--> (p a c :--> p a d)) Source #

Instances

Instances details
PProfunctor (:-->) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.Extra.Profunctor

Associated Types

type PContraSubcategory (:-->) :: (S -> Type) -> Constraint Source #

type PCoSubcategory (:-->) :: (S -> Type) -> Constraint Source #

Methods

pdimap :: forall (a :: S -> Type) (b :: S -> Type) (c :: S -> Type) (d :: S -> Type) (s :: S). (PContraSubcategory (:-->) a, PContraSubcategory (:-->) b, PCoSubcategory (:-->) c, PCoSubcategory (:-->) d) => Term s ((a :--> b) :--> ((c :--> d) :--> ((b :--> c) :--> (a :--> d)))) Source #

plmap :: forall (a :: S -> Type) (b :: S -> Type) (c :: S -> Type) (s :: S). (PContraSubcategory (:-->) a, PContraSubcategory (:-->) b, PCoSubcategory (:-->) c) => Term s ((a :--> b) :--> ((b :--> c) :--> (a :--> c))) Source #

prmap :: forall (a :: S -> Type) (c :: S -> Type) (d :: S -> Type) (s :: S). (PContraSubcategory (:-->) a, PCoSubcategory (:-->) c, PCoSubcategory (:-->) d) => Term s ((c :--> d) :--> ((a :--> c) :--> (a :--> d))) Source #

PFunctor f => PProfunctor (PStar f) Source #

If f is at least a PFunctor, we can pre-process and post-process work done in PStar f using pure functions.

Since: 3.1.0

Instance details

Defined in Plutarch.Extra.Star

Associated Types

type PContraSubcategory (PStar f) :: (S -> Type) -> Constraint Source #

type PCoSubcategory (PStar f) :: (S -> Type) -> Constraint Source #

Methods

pdimap :: forall (a :: S -> Type) (b :: S -> Type) (c :: S -> Type) (d :: S -> Type) (s :: S). (PContraSubcategory (PStar f) a, PContraSubcategory (PStar f) b, PCoSubcategory (PStar f) c, PCoSubcategory (PStar f) d) => Term s ((a :--> b) :--> ((c :--> d) :--> (PStar f b c :--> PStar f a d))) Source #

plmap :: forall (a :: S -> Type) (b :: S -> Type) (c :: S -> Type) (s :: S). (PContraSubcategory (PStar f) a, PContraSubcategory (PStar f) b, PCoSubcategory (PStar f) c) => Term s ((a :--> b) :--> (PStar f b c :--> PStar f a c)) Source #

prmap :: forall (a :: S -> Type) (c :: S -> Type) (d :: S -> Type) (s :: S). (PContraSubcategory (PStar f) a, PCoSubcategory (PStar f) c, PCoSubcategory (PStar f) d) => Term s ((c :--> d) :--> (PStar f a c :--> PStar f a d)) Source #