diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f440d8..30d45c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Class methods now capture two perspectives: "`Decidable` operations on the input (`decideP`)" and "eithering" (`(+++!)`). * Add `decidedP = decideP id` +* Add `concludedP = concludeP id` # 0.11.0.3 diff --git a/Data/Profunctor/Product/Class.hs b/Data/Profunctor/Product/Class.hs index 889552d..a8965a4 100644 --- a/Data/Profunctor/Product/Class.hs +++ b/Data/Profunctor/Product/Class.hs @@ -219,3 +219,10 @@ class SemisumProfunctor p => SumProfunctor p where concludeP :: (a -> Void) -> p a x concludeP f = Profunctor.dimap f absurd voidP {-# MINIMAL voidP | concludeP #-} + +-- | Analogue to @concluded@ (from "semigroupoids") or +-- 'Data.Functor.Contravariant.Divisible.lost'. Potentially more +-- meaningful than 'concludeP', as it shows that we definitely cannot +-- receive _anything_ on the input side. +concludedP :: SumProfunctor p => p Void x +concludedP = concludeP id