| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Category.Instance.PointedHask
Synopsis
- data POINTED = P Type
- data Pointed (a :: POINTED) (b :: POINTED) where
- toHask :: ('P a ~> 'P b) -> Maybe a -> Maybe b
- data These a b
- memptyDefault :: Monoid a => (Unit :: POINTED) ~> 'P a
- mappendDefault :: Monoid a => ('P a ** 'P a) ~> 'P a
- underlyingPt :: forall k (a :: k) (b :: k). HasZeroObject k => (a ~> b) -> (Unit :: POINTED) ~> 'P (a ~> b)
- enrichedPt :: forall k (a :: k) (b :: k). (Ob a, Ob b, HasZeroObject k) => ((Unit :: POINTED) ~> 'P (a ~> b)) -> a ~> b
- compPt :: forall k (a :: k) (b :: k) (c :: k). (Ob a, Ob b, Ob c, HasZeroObject k) => ('P (b ~> c) ** 'P (a ~> b)) ~> 'P (a ~> c)
- data FromPointed (f :: Type -> Type) (a :: POINTED) where
- FromPointed :: forall (f :: Type -> Type) a1. {..} -> FromPointed f ('P a1)
- type Filterable (f :: Type -> Type) = Functor (FromPointed f)
- mapMaybe :: Filterable f => (a -> Maybe b) -> f a -> f b
- type Align (f :: Type -> Type) = Applicative (FromProd (FromPointed f))
- alignWith :: Align f => (These a b -> Maybe c) -> f a -> f b -> f c
- nil :: Align f => f a
Documentation
Instances
data Pointed (a :: POINTED) (b :: POINTED) where Source Github #
Instances
| Promonad Pointed Source Github # | |
| MonoidalProfunctor Pointed Source Github # | |
| Profunctor Pointed Source Github # | |
Defined in Proarrow.Category.Instance.PointedHask Methods dimap :: forall (c :: POINTED) (a :: POINTED) (b :: POINTED) (d :: POINTED). (c ~> a) -> (b ~> d) -> Pointed a b -> Pointed c d Source Github # lmap :: forall (c :: POINTED) (a :: POINTED) (b :: POINTED). (c ~> a) -> Pointed a b -> Pointed c b Source Github # rmap :: forall (b :: POINTED) (d :: POINTED) (a :: POINTED). (b ~> d) -> Pointed a b -> Pointed a d Source Github # (\\) :: forall (a :: POINTED) (b :: POINTED) r. ((Ob a, Ob b) => r) -> Pointed a b -> r Source Github # | |
data These a b Source Github #
Instances
| Generic (These a b) Source Github # | |||||
Defined in Proarrow.Category.Instance.PointedHask Associated Types
| |||||
| (Show a, Show b) => Show (These a b) Source Github # | |||||
| (Eq a, Eq b) => Eq (These a b) Source Github # | |||||
| type Rep (These a b) Source Github # | |||||
Defined in Proarrow.Category.Instance.PointedHask type Rep (These a b) = D1 ('MetaData "These" "Proarrow.Category.Instance.PointedHask" "proarrow-0-inplace" 'False) (C1 ('MetaCons "This" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 a)) :+: (C1 ('MetaCons "That" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "These" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 b)))) | |||||
underlyingPt :: forall k (a :: k) (b :: k). HasZeroObject k => (a ~> b) -> (Unit :: POINTED) ~> 'P (a ~> b) Source Github #
Categories with a zero object can be seen as categories enriched in Pointed.
enrichedPt :: forall k (a :: k) (b :: k). (Ob a, Ob b, HasZeroObject k) => ((Unit :: POINTED) ~> 'P (a ~> b)) -> a ~> b Source Github #
compPt :: forall k (a :: k) (b :: k) (c :: k). (Ob a, Ob b, Ob c, HasZeroObject k) => ('P (b ~> c) ** 'P (a ~> b)) ~> 'P (a ~> c) Source Github #
data FromPointed (f :: Type -> Type) (a :: POINTED) where Source Github #
Constructors
| FromPointed | |
Fields
| |
Instances
| Functor (FromPointed (Map k) :: POINTED -> Type) Source Github # | |
Defined in Proarrow.Category.Instance.PointedHask | |
| Functor (FromPointed []) Source Github # | |
Defined in Proarrow.Category.Instance.PointedHask | |
| Ord k => Applicative (FromProd (FromPointed (Map k)) :: PROD POINTED -> Type) Source Github # | |
Defined in Proarrow.Category.Instance.PointedHask Methods pure :: forall (a :: PROD POINTED). ((Unit :: PROD POINTED) ~> a) -> (Unit :: Type) ~> FromProd (FromPointed (Map k)) a Source Github # liftA2 :: forall (a :: PROD POINTED) (b :: PROD POINTED) (c :: PROD POINTED). (Ob a, Ob b) => ((a ** b) ~> c) -> (FromProd (FromPointed (Map k)) a ** FromProd (FromPointed (Map k)) b) ~> FromProd (FromPointed (Map k)) c Source Github # | |
| Applicative (FromProd (FromPointed [])) Source Github # | |
Defined in Proarrow.Category.Instance.PointedHask Methods pure :: forall (a :: PROD POINTED). ((Unit :: PROD POINTED) ~> a) -> (Unit :: Type) ~> FromProd (FromPointed []) a Source Github # liftA2 :: forall (a :: PROD POINTED) (b :: PROD POINTED) (c :: PROD POINTED). (Ob a, Ob b) => ((a ** b) ~> c) -> (FromProd (FromPointed []) a ** FromProd (FromPointed []) b) ~> FromProd (FromPointed []) c Source Github # | |
type Filterable (f :: Type -> Type) = Functor (FromPointed f) Source Github #
type Align (f :: Type -> Type) = Applicative (FromProd (FromPointed f)) Source Github #
Not quite Align from the semialign package.
This requires being able to dynamically decide per position if it is included in the result.
So more like merge from Data.Map.