Edward Kmett
2018-06-07 19:20:54 UTC
Iâm generally on board with doing this proposal, but on a pretty slow time table. Why? There is an active change I want to make to the API of semigroupoids that will require a major version bump and would affect the API for Foldable1 among other classes in the library.
The change is more or less the move to calling it Semifoldable, and refactoring Bind and Apply into Semimonad and Semiapplicative to enable users to find prior literature on the ideas behind them.
This will require a major version bump on the semigroupoids package and Iâd like to see the dust settle on that before we proceed with anything that as it involves over 100 downstream dependencies having to move. Fortunately I wrote about half of them. Unfortunately, Iâm doing a lot of travel for the next couple of months so it may be a bit of a community effort to get everything patched over once we decide to pull the trigger.
I prefer to make big API changes far outside of base. They are much more expensive to make after things merge in.
-Edward
The change is more or less the move to calling it Semifoldable, and refactoring Bind and Apply into Semimonad and Semiapplicative to enable users to find prior literature on the ideas behind them.
This will require a major version bump on the semigroupoids package and Iâd like to see the dust settle on that before we proceed with anything that as it involves over 100 downstream dependencies having to move. Fortunately I wrote about half of them. Unfortunately, Iâm doing a lot of travel for the next couple of months so it may be a bit of a community effort to get everything patched over once we decide to pull the trigger.
I prefer to make big API changes far outside of base. They are much more expensive to make after things merge in.
-Edward
For those of you unfamiliar with 'Foldable1', it is a typeclass for nonempty foldable structures, that centres around Semigroup instead of Monoid.
I have made a differential on Phabricator for the change here: https://phabricator.haskell.org/D4812
https://ghc.haskell.org/trac/ghc/ticket/13573
https://www.reddit.com/r/haskell/comments/8p531d/ann_safefoldable_safe_wrappers_for_nullpartial/
https://github.com/ekmett/semigroupoids/issues/49
Note: foldl1 and foldr1 are currently typeclass methods of 'Foldable' and not 'Foldable1', and even though I think they should be, they probably (and shouldn't) be removed in this change, though I hope that eventually they can be moved to Foldable1.
Foldable1 is also unfortunately named due to the suffix '1' being connotated with the conventions surrounded Data.Functor.Classes (Show1, Eq1, etc.). If this naming is seen as sufficiently unfortunate/confusing because of that, then perhaps the name should be changed to something like 'SemiFoldable'. The name change would most likely have to be made in 'semigroupoids' first if that is the case.
_______________________________________________
Libraries mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
I have made a differential on Phabricator for the change here: https://phabricator.haskell.org/D4812
https://ghc.haskell.org/trac/ghc/ticket/13573
https://www.reddit.com/r/haskell/comments/8p531d/ann_safefoldable_safe_wrappers_for_nullpartial/
https://github.com/ekmett/semigroupoids/issues/49
Note: foldl1 and foldr1 are currently typeclass methods of 'Foldable' and not 'Foldable1', and even though I think they should be, they probably (and shouldn't) be removed in this change, though I hope that eventually they can be moved to Foldable1.
Foldable1 is also unfortunately named due to the suffix '1' being connotated with the conventions surrounded Data.Functor.Classes (Show1, Eq1, etc.). If this naming is seen as sufficiently unfortunate/confusing because of that, then perhaps the name should be changed to something like 'SemiFoldable'. The name change would most likely have to be made in 'semigroupoids' first if that is the case.
_______________________________________________
Libraries mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries