I think there is another problem with having strict constructors. It messes
up parametricity even more than fix does. There are two reasons why this
would be a shame:

* Parametricity is cool. It lets you prove lots of interesting theorems
  for very little work. These theorems help with program transformation
  and the like.

* Some compilers use parametricity. In particular, the justification for
  cheap deforestation method (foldr-build) comes from parametricity. If
  parametricity is weakened too much the transformation may become unsafe.

One way to introduce strictness is to use overloading and have a class
Strict with an operation
  strict : a -> a
defined for each type in the class (not including functions unless their
semantics changes, nor unlifted products if they get introduced). Then a
strict constructor would have a class restriction and these would provide
the standard mediation for parametricity.

John.



Reply via email to