Major revision of basic and generic-programming-based Haskell implementations