Scala-Category-Theory icon indicating copy to clipboard operation
Scala-Category-Theory copied to clipboard

Adds category typeclass with hask instance

Open neutropolis opened this issue 8 years ago • 4 comments

Adds Category as a typeclass with an instance for Hask (functions and types). As a consequence, laws can be defined now in a general way.

neutropolis avatar Oct 31 '17 16:10 neutropolis

Now, you should be able to use generic laws to test particular instances. I recommend you to read about typeclasses (Functor, Eq, etc.) to understand what is going on in this code. I hope this serves you! :wink:

neutropolis avatar Oct 31 '17 16:10 neutropolis

I've made a mess mergin this PR. I want to merge it to a different branch than master, to keep it for a future improve (as I learn more CT and understand better what this code does)

Would you mind if I left this PR as it is? or could you try to make the PR to category-improved branch?

Bests, and thank you.

elbaulp avatar Nov 01 '17 10:11 elbaulp

Of course, use it at your best convenience! Feel free to ignore (or even close) this.

neutropolis avatar Nov 01 '17 14:11 neutropolis

No, I won't ignore it nor close it, By the time I am able to understand it fully I will merge it.

Bests

elbaulp avatar Nov 01 '17 17:11 elbaulp