Newclasses are something like instances, but out of scope. In a baggage.
We already have too many classes: (...)
We can't divide all classes to atimic ones.
Main purpose of newclasses is to make instances as minimal as possible. In
many cases empty.
About newclass and compose data, we can do next:
newclass Foo [a] => FooList a where {containerMainipulation=...}
newclass Foo (Set a) => FooSet a where {containerMainipulation=...}
newclass Foo (Sequence a) => FooSeq a where {containerMainipulation=...}
so now I can switch any container of my data, changing only name of
newclass:
instance FooList MyData where {dataMainipulation=...}
Or let I have an MyArrow data. And I need some semigroupoid manipulations.
I just write
instance ArrSemigroupoid MyArrow --empty
that's all, I plug-in, let's just use semigroupoids functions!
Or I have MyMonad and I want some Functor, so I just plug-in:
instance MFunctor MyMonad --empty
that's all.
I also need some Applicative! Easy:
instance MApplicative MyMonad --empty again
done!