archives

What is polytypic programming?

Generic programming — Or: write everything once

Ralf Hinze summarizes polytypic programming, with a focus on Generic Haskell. He discusses:

  • Generic functions on types
  • Generic functions on type constructors
  • Generic types
In addition to the usual generic equality and serialization, he mentions fold and map (though not by name), along with a dozen other ideas that use polytypism. He also notes that the Generic Haskell experiment will be continued and integrated into a "standard Haskell compiler".