Functional dependencies in Haskell
When you have a multiparameter typeclass, by default, the type variables are considered independently. So when the type inferencer is trying to figure out which instance of class Foo a b to choose, it has to determine a and b independently, then go look check to see if the instance exists. With functional dependencies, we … Read more