arrow-incubator icon indicating copy to clipboard operation
arrow-incubator copied to clipboard

Add implementation for Can

Open pablisco opened this issue 4 years ago • 5 comments

Transferred from https://github.com/arrow-kt/arrow-core/pull/103

Implementation of Canfrom the Haskell Smash package: https://hackage.haskell.org/package/smash-0.1.1.0/docs/Data-Can.html

Related to https://github.com/arrow-kt/arrow-incubator/issues/108

pablisco avatar Jun 07 '20 23:06 pablisco

Are we good with this? @aballano :)

pablisco avatar Jul 19 '20 11:07 pablisco

I'll look at this later today :)

Did a quick skim right now and this seems really well done :+1:

However I do have one question:This is not a transformer, why would we put this into mtl? I can understand keeping arrow-core slim, but mtl does not seem like the right place for this. I don't have a much better idea where to put it though, so it might be fine for now.

1Jajen1 avatar Jul 21 '20 10:07 1Jajen1

IMO A new module called experimental can be added to the incubator with sub modules if needed to group topics. MTL is still in incubator because we are close to find a encoding that does not require Kinds for polymorphism and can interleave effects in suspension. I believe all these transformers could be rewritten that way and the types would be much easier without kinds.

raulraja avatar Jul 22 '20 02:07 raulraja

IMO A new module called experimental can be added to the incubator with sub modules if needed to group topics

That does make sense to me as well. We could also add something like arrow-extras as a repo and get individual modules there for the more obscure and rare use types and typeclasses.

MTL is still in incubator because we are close to find a encoding that does not require Kinds for polymorphism and can interleave effects in suspension. I believe all these transformers could be rewritten that way and the types would be much easier without kinds.

I'd love to drop mtl as soon as we have an actual effect system, do you have some links for this? I'd love to read up on it's attempted in arrow.

1Jajen1 avatar Jul 22 '20 08:07 1Jajen1

Thank you @1Jajen1 for all the comments 🙇 I'll try to get through them over the weekend :)

Btw, I'm happy to move Can somewhere more pertinent :)

pablisco avatar Jul 23 '20 00:07 pablisco