Hello,
it is a real code snippet, but I failed to include the necessary pragma (which
is:
{-# OPTIONS_GHC -fglasgow-exts #-}
or
{-# OPTIONS_GHC -XMagicHash #-}
at the beginning of the file).
the # suffix is for unboxed types:
Hi,
On Wednesday 28 January 2009 04:30:07 John Goerzen wrote:
On Tue, Jan 27, 2009 at 09:41:30PM -0500, wren ng thornton wrote:
I once again point out that realToFrac is *wrong* for converting from
Float or Double.
realToFrac (1/0::Float) ::Double
3.402823669209385e38
wren ng thornton wrote:
John Goerzen wrote:
Hi folks,
I have uploaded a new package to Haskell: convertible. At its heart,
it's a very simple typeclass that's designed to enable a reasonable
default conversion between two different types without having to
remember a bunch of functions.
I
John Goerzen wrote:
wren ng thornton wrote:
I once again point out that realToFrac is *wrong* for converting from
Float or Double.
realToFrac (1/0::Float) ::Double
3.402823669209385e38
Yes, I understand what you are saying and agree with you. But there
is nothing better in the
wren ng thornton wrote:
John Goerzen wrote:
wren ng thornton wrote:
I once again point out that realToFrac is *wrong* for converting from
Float or Double.
realToFrac (1/0::Float) ::Double
3.402823669209385e38
Yes, I understand what you are saying and agree with you. But there
wren ng thornton wrote:
[1] The Ord instance for Float and Double is also wrong, since NaN means
there's no total ordering (and the existence of NaN is necessitated by
the existence of Infinity). In addition to the fact that partial
orderings are more common than total orderings, this
On Wed, Jan 28, 2009 at 5:28 PM, wren ng thornton w...@freegeek.org wrote:
John Goerzen wrote:
wren ng thornton wrote:
I wonder if you would consider submitting a patch to base? It seems
that this is a sore problem there, and ideally should be dealt with
properly in base.
As Bertram
On Wed, 2009-01-28 at 18:41 -0500, Michael D. Adams wrote:
On Wed, Jan 28, 2009 at 5:28 PM, wren ng thornton w...@freegeek.org wrote:
John Goerzen wrote:
wren ng thornton wrote:
I wonder if you would consider submitting a patch to base? It seems
that this is a sore problem there, and
John Goerzen wrote:
wren ng thornton wrote:
John Goerzen wrote:
wren ng thornton wrote:
I once again point out that realToFrac is *wrong* for converting from
Float or Double.
Yes, I understand what you are saying and agree with you. But there
is nothing better in the standard
Duncan Coutts wrote:
Michael D. Adams wrote:
Is there a good reason why Rational is defined in a way that it can
not represent Nan, Inf and -Inf? (Any other exceptional values I
forgot?) Would fixing the definition so that it can represent those
values be sufficient to fix this entire
John Goerzen wrote:
Hi folks,
I have uploaded a new package to Haskell: convertible. At its heart,
it's a very simple typeclass that's designed to enable a reasonable
default conversion between two different types without having to
remember a bunch of functions.
I once again point out that
On Tue, Jan 27, 2009 at 09:41:30PM -0500, wren ng thornton wrote:
John Goerzen wrote:
Hi folks,
I have uploaded a new package to Haskell: convertible. At its heart,
it's a very simple typeclass that's designed to enable a reasonable
default conversion between two different types without
12 matches
Mail list logo