purescript-filterable icon indicating copy to clipboard operation
purescript-filterable copied to clipboard

Add Chipped type

Open LiamGoodacre opened this issue 9 years ago • 6 comments

"Traversable containers which hold Maybe are witherable."

https://hackage.haskell.org/package/witherable-0.1.3.3/docs/Data-Witherable.html#t:Chipped

LiamGoodacre avatar Jul 24 '16 15:07 LiamGoodacre

Functor t => Filterable (Chipped t)
Traversable t => Witherable (Chipped t)

LiamGoodacre avatar Aug 01 '16 20:08 LiamGoodacre

How does this differ from MaybeT f a?

joneshf avatar Aug 04 '16 14:08 joneshf

@joneshf absolutely no difference. I'm debating between:

  • adding Chipped
  • depending on purescript-transformers with appropriate instances
  • not doing anything

LiamGoodacre avatar Aug 04 '16 21:08 LiamGoodacre

Another options is transformers depends on this library.

joneshf avatar Aug 04 '16 21:08 joneshf

Now that this library is one of the core libraries, @joneshf's proposal should be re-examined as a possible way forward.

JordanMartinez avatar Dec 04 '21 16:12 JordanMartinez

I think an alternative to chipped might be to have an instance for composition, then use (f ∘ Maybe) rather than Chipped f.

(Traversable f, Witherable g) => Witherable (f ∘ g)

I haven't thought about it very much, so may or may not be lawful.

LiamGoodacre avatar Dec 04 '21 16:12 LiamGoodacre