Skip to content

Commit

Permalink
Update documentation regarding arrow instances
Browse files Browse the repository at this point in the history
  • Loading branch information
mniip committed Jun 22, 2024
1 parent 7b42d7a commit 7f2bf7a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
31 changes: 30 additions & 1 deletion CHANGELOG.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,36 @@
* Re-export Data.Bifunctor.Functor's (:->) rather than supply our own
so the two definitions do not conflict.
* Added fixpoints of ProfunctorFunctors.
* Add `instance Monoid r => Applicative (Forget r a)`.
* Added `instance Monoid r => Applicative (Forget r a)`.
* Added a number of (co)strength instances:
* `MonadFix f => Costrong (Star f)`
* `Strong p => Strong (TambaraSum p)`
* `Costrong p => Costrong (TambaraSum p)`
* `Strong p => Strong (PastroSum p)`
* `(Strong p, Costrong q) => Costrong (Rift p q)`
* `(Choice p, Cochoice q) => Cochoice (Rift p q)`
* `(Strong p, Costrong q) => Costrong (Ran p q)`
* `(Choice p, Cochoice q) => Cochoice (Ran p q)`
* `(Strong p, Costrong p) => Costrong (Codensity p)`
* `(Choice p, Cochoice p) => Cochoice (Codensity p)`
* `(Profunctor p, Strong q) => Strong (Day p q)`
* `(Choice p, Choice q) => Choice (Day p q)`
* Added `Arrow`, `ArrowChoice`, and `ArrowLoop` instances to all types that have appropriate (co)strength.
* Added `ArrowPlus p => ArrowPlus (WrappedArrow p)`
* Added other arrow isntances:
* `MonadPlus f => ArrowZero (Star f)`
* `MonadPlus f => ArrowPlus (Star f)`
* `Monad f => ArrowApply (Star f)`
* `(ArrowZero p, Profunctor p) => ArrowZero (CofreeTraversing p)`
* `(ArrowPlus p, Profunctor p) => ArrowPlus (CofreeTraversing p)`
* `ArrowZero p => ArrowZero (TambaraSum p)`
* `ArrowPlus p => ArrowPlus (TambaraSum p)`
* `(ArrowZero p, Profunctor p) => ArrowZero (Yoneda p)`
* `(ArrowPlus p, Profunctor p) => ArrowPlus (Yoneda p)`
* `(ArrowApply p, Profunctor p) => ArrowApply (Yoneda p)`
* `(ArrowZero p, Profunctor p) => ArrowZero (Coyoneda p)`
* `(ArrowPlus p, Profunctor p) => ArrowPlus (Coyoneda p)`
* `(ArrowApply p, Profunctor p) => ArrowApply (Coyoneda p)`

5.6.2 [2021.02.17]
------------------
Expand Down
7 changes: 3 additions & 4 deletions src/Data/Profunctor/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,16 @@ instance Comonad f => Category (Costar f) where
-- Wrapped Profunctors
------------------------------------------------------------------------------

-- |
-- | This newtype allows 'Profunctor' classes to be used with types that only
-- implement @base@'s arrow classes.
--
-- - 'Arrow' is equivalent to 'Category'
-- && t'Data.Profunctor.Strong.Strong'.
-- - 'ArrowChoice' is equivalent to 'Category'
-- && t'Data.Profunctor.Strong.Strong' && t'Data.Profunctor.Choice.Choice'.
-- - 'ArrowLoop' is equivalent to 'Category'
-- && t'Data.Profunctor.Strong.Strong' && t'Data.Profunctor.Strong.Costrong'.
--
-- This newtype allows 'Profunctor' classes to be used with types that only
-- implement @base@'s arrow classes.
--
-- 'WrappedArrow' has a polymorphic kind since @5.6@.

-- WrappedArrow :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type)
Expand Down

0 comments on commit 7f2bf7a

Please sign in to comment.