Design proposal:
Allow total and partial function spaces
and, moreover, the type constructor "?",
where for a type t, ?t > t is the type
that extends t by an "undefined" element.
The semantics of ?t is t united
with a new "undefined" element
(this is isomorphic to, but not necessarily equal to
the partial
function space [() -> ? t] from the empty
product to t4).
Homomorphisms have to reflect
(but not necessarily preserve) the undefined
element. This is different from what one might
expect, but fits well the CASL approach
to partiality and in particular the
intuition that initial models are
those with no junk, no confusion and
minimal definedness5.
Alternatives: