[Yhc] Possible bug with floats
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Fri Oct 27 06:17:34 EDT 2006
"Dimitry Golubovsky" <golubovsky at gmail.com> wrote:
> y f = case f of
> 1.0 -> 2.0
> 3.45 -> 0.2e-4
> 0.99 -> 7.463
> other -> -3.65
Eek! Whilst you have certainly found a bug, it has to be said that
pattern-matching against literal floats is a _really_ bad idea in
general anyway. I'm hoping that Float patterns will be kicked out of
Haskell-prime, so that programmers are forced to think a bit harder
about what they really want.
Regards,
Malcolm
More information about the Yhc
mailing list