Open
Description
I think it makes more sense to have a more precise hierarchy for contravariant functors.
- Separate
divide
andconquer
into two classes? - Seperate
lose
andchoose
into two classes? - Add class to handle
These
? - What about analog for
Selective
functors?
I need to figure out some laws that should give better guidance. For now, here is some spit-balling. All names here are subject to change.
class (Contravariant f) ⇒ Losable f where
emptied ∷ f Void
emptied' ∷ (Decidable f) ⇒ f Void
emptied' = lost
-- `covacuous`?
empty ∷ f a → f Void
empty = contramap absurd
class (Decidable f) ⇒ RenameMe f where
renameme ∷ (a → These b c) → f b → f c → f a
renamed ∷ (RenameMe f) ⇒ f b → f c → f (These b c)
renamed = renameme id
renamed' ∷ (RenameMe f) ⇒ f a → f a → f a
renamed' = renameme (\s → These s s)
Activity