
hawkcode.blogspot.com
Hawk's blogMonday, July 25, 2016. Haskell: How (not) to Overload Type Classes. After studying haskell as a hobby for some time now, I'm still "thinking OOP". In particular I still don't find myself comfortable with Type Classes. Every time I use them I "feel" the need to write a Type Class that extends another one (as if they where c classes). But if you want to extend a Type Class you just need a plain function. Like in:. Class T1 a where m1 : a - Int doubleM1 : (T1 a) = a - Int doubleM1 x = 2 * m1 x. What is an i...
http://hawkcode.blogspot.com/