Proposal: Strict types

Tyson Whitehead twhitehead at gmail.com
Mon Feb 21 14:43:06 CET 2011


On February 21, 2011 08:15:38 Tyson Whitehead wrote:
> The non-deterministic semantics
> 
> ??? _|_ x -> possibly _|_ or x
> 
> are also pretty interesting.  Very reminiscent of what can happen with
> rewrites in the presence of the other two.  Could there be something here
> (i.e., this would allow you to have rewrites that still preserve the
> semantics as the non-determinism would officially be part of the
> semantics)?

To clarify a bit more.  Traditionally, I believe the problem is you use seq in 
some function f.  Appearing in some composition g, f results in the semantics

  g _|_ /= a

There is a rewrite that either you or the compiler would like to perform on 
the composition g to give g', but due to seq/pseq in f you windup with

  g' _|_ = _|_

(or the other way around).  If we are using ??? instead of seq/pseq, however, 
this the rewrite can be expressed such that the semantics are preserved

  g _|_ = a or _|_ non-deterministically
  g' _|_ = a or _|_ non-deterministically

Cheers!  -Tyson



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://www.haskell.org/pipermail/libraries/attachments/20110221/f1a2c2ca/attachment.pgp>


More information about the Libraries mailing list