Bounded and floating types

Conal Elliott conal at conal.net
Mon Dec 3 18:33:55 EST 2007


I'm using the bounds for event occurrence times.  Or, from another angle,
for times associated with when values can become known.  Pure values have
time minBound, while eternally unknowable values (non-occurring events) have
time maxBound.  Hm.  Now that I put it that way, I realize that I don't want
to use existing minBound and maxBound if they're finite.  (My event types
are temporally polymorphic.)  I'm mainly interested in Float/Double times,
which have infinities in practice but apparently not guaranteed by the
language standard.  I guess I'll either (a) bake in Double (temporally
monomorphic) and rely on infinities not guaranteed by the standard, or (b)
keep temporal polymorphism and add infinities to time parameter.  For now,
(b).

Cheers,  - Conal


On Dec 2, 2007 1:08 PM, Henning Thielemann < lemming at henning-thielemann.de>
wrote:

>
> On Sun, 2 Dec 2007, Conal Elliott wrote:
>
> > Oops -- I'd incorrectly assumed that Haskell guarantees Float & Double
> to
> > have infinities.  Thanks,  - Conal
>
> Aside from that - what do you intend to do with the bounds?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20071203/15719f00/attachment-0001.htm


More information about the Libraries mailing list