Re: [Haskell-cafe] ANN: convertible (first release)

2009-02-10 Thread Daniel Schüssler
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:

Re: [Haskell-cafe] ANN: convertible (first release)

2009-02-09 Thread Daniel Schüssler
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-28 Thread Bertram Felgenhauer
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-28 Thread wren ng thornton
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-28 Thread John Goerzen
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-28 Thread John Goerzen
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-28 Thread Michael D. Adams
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-28 Thread Duncan Coutts
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-28 Thread wren ng thornton
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-28 Thread wren ng thornton
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-27 Thread wren ng thornton
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

Re: [Haskell-cafe] ANN: convertible (first release)

2009-01-27 Thread John Goerzen
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