[Haskell-cafe] Show function a -> String

Tsunkiet Man temp.tsun at gmail.com
Fri Nov 27 07:56:25 EST 2009


yes that is exactly what I mean, however I mean what kind of value do I need
to input in 'a' that gets me an error back? That is is from the Floating
class? (Other than undefined)

Could you please explain to me what IEEE 754 is and what exactly is a
denormalized value? (After responding, I will google it also though).

Thank you for your help,


2009/11/27 Roel van Dijk <vandijk.roel at gmail.com>

> >ShowFloat -> Floating -> String
> I do not really understand this type.
> Did you mean something like this:
> showFloat :: (Show a, Floating a) => a -> String
> showFloat = show
> In that case it depends on what type you fill in for 'a' and more
> specifically that type's Show instance. One value for which most (or
> all) show functions will give an error is ⊥ (undefined). If the type
> you pick is some kind of IEEE 754 type then you might have some
> trouble with denormalized values. But that is just a guess, you would
> have to test for that.
> If that is not what you mean than I would appreciate some clarification.
> Regards,
> Roel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091127/be56cd23/attachment.html

More information about the Haskell-Cafe mailing list