Re:Implementing and Understanding Type Classes (2014)
by calebh on Sunday April 29, 2018 @01:45PM
(#16953016)
To call a function declared by a type class, you can use dictionary passing or monomorphization. GHC uses monomorphization as much as possible since it has zero overhead. Dictionaries are required only in very specific situations.
Additionally, GHC will try to monomorphise bounded functions if it can, because it's simply much faster without the extra layer of indirection.
I could be equating a few things which aren't equal, but I'd love to hear your take (or anyone elses)