Skip to content

Why is Semigroup not implemented as a Type Class, but as a regular interface? #1724

Answered by Avaq
Avaq asked this question in Q&A
Discussion options

You must be logged in to vote

I realized what the answer to this is. 🤦

It has to do with the kind of the types that the class has been defined for. Functor must take a higher kinded type of arity 1, whereas Semigroup can also be implemented for basic types (of arity 0).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Avaq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant