Type classes are for reusability
From HaskellWiki
I see a certain overuse of typeclasses in Haskell libraries.
Type classes are not intended for massive re-use of some short identifier likefmap
(e.g. do notation or number literals). Instead type classes exist for writing reusable code.
Functions written using theNum
Int
Integer
Rational
Float
Double
mapM
replicateM
Monad
Thus, think twice:
Do you really need aNum
80
(*)
fromInteger
(+)
(*)
and indeed Numeric Prelude chooses a different set of operations. But it is generally accepted that number literals are reserved for objects that allow some sort of arithmetics.)
Isn'tport 80
Functor
What distinguishes the second member from the first member? Is the generic pair type the right choice, or should it better be a custom type?
Do you really need aMonad
Or did you define the instance only for the do notation? Please, give the monoid a try!
