[Hs-Generics] patch applied (generics): Nested data types for Smash. Less easy, but possible -- and even a bit insightful.

Oleg Kiselyov oleg at pobox.com
Tue Jun 19 07:00:18 EDT 2007


Tue Jun 19 03:53:35 PDT 2007  oleg at okmij.org
  * Nested data types for Smash. Less easy, but possible -- and even a bit insightful.
  Nested data types with Smash is a bit less obvious: polymorphic recursion
  in the presence of constraints doesn't quite work. Smash is more general
  than is required for this task. The solution is nevertheless possible and
  short. It also illustrates how to pass generic functions as arguments
  without any need for higher-rank types. So, Smash's generic functions
  are first-class, and have always been. It just goes to show to
  higher-rank is already present in Haskell98.

    A ./comparison/SmashA/Nested.hs
    A ./comparison/SmashA/PerfectDats.hs
    M ./comparison/SmashA/RoseDats.hs -1 +1


More information about the Generics mailing list