PolyP is a functional language extension that adds polytypic functions to
a subset of Haskell. I have implemented an experimental version of PolyP  
(currently version 0.4) that takes a polytypic Haskell program and
translates it to Haskell.
Now I am interested in feedback from users, to further develop the system.
The distribution that can be found at
  http://www.cs.chalmers.se/~patrikj/poly/polyp/
includes the translator and a library of polytypic functions with
examples.

PolyP automatically generates instances of for example
  pmap :: Regular d => (a->b) -> d a -> d b
    A generalisation of the normal map to all regular
    datatypes. Applies a function to all elements in a structure.
    Can be seen as the result of `deriving Functor'.
  size :: Regular d => d a -> Int
    A generalisation of length on lists. Counts the number of
    elements of type a in a structure.
  pzip :: Regular d => (d a,d b) -> Maybe (d (a,b))
    A generalisation of zip on lists. Takes a pair of structures to
    Just a structure of pairs if they match. Otherwise Nothing.
  cata :: Regular d => ((FunctorOf d) a b -> b) -> d a -> b
     A generalised foldr. The catamorphism is a general recursion
     operator that replaces datatype constructors with supplied  
     functions.

For more information see the papers
  Jansson & Jeuring, PolyP - a polytypic programming language extension, POPL'97
  Jeuring & Jansson, Polytypic programming, AFP'96, LNCS 1129
that are available through my home page.
  http://www.cs.chalmers.se/~patrikj/   
    
Patrik Jansson, Chalmers U. of T., Sweden
[EMAIL PROTECTED]





Reply via email to