0/0 => "nan", not "NaN". Also,
empty hsc2hs dir and "invalid predicate `-wholename'"
sven.panne at aedion.de
Thu Mar 22 10:54:56 EDT 2007
On Thursday 22 March 2007 02:13, Ian Lynagh wrote:
> hugs thinks that
> show (0/0 :: Double)
> is "nan", but it will only read "NaN". I'd suggest changing the
> behaviour of show rather than that of read, so as to match GHC:
> Prelude> show (0/0 :: Double)
> Prelude> read "nan" :: Double
> *** Exception: Prelude.read: no parse
> Prelude> read "NaN" :: Double
> NaN [...]
What's even worse: I've just seen that neither Hugs nor nhc98 implement isNaN,
isInfinte, isDenormalized, isNegativeZero and isIEEE. :-( GHC does it via
some bit-fiddling in StgPrimFloat.c, but it is unclear to me why the stuff
from <math.h> (isnan() etc.) is not simply used instead. Does anybody
remember? These macros are C99, I think, but do we really support older C
> While building CVS/darcs hugs I got
> darcs get --partial http://darcs.haskell.org/hsc2hs
> Directory '/home/ian/code/hugs/hugs98/hsc2hs' already exists, creating
> repository as '/home/ian/code/hugs/hugs98/hsc2hs_0'
> I think due to an empty CVS directory; I had to jiggle them around for
> it to build later on.
I think the right way to solve this is having a "update -Pd" line in ~/.cvsrc.
I fail to understand why this behaviour is not the default...
> I also got
> /usr/bin/find: invalid predicate `-wholename'
> thrice. Replacing -wholename with -path in libraries/tools/make_bootlib
> let the build go through, but I'm not sure if this is either (a) correct
> or (b) a superset of the portability of -wholename.
We had reports about this earlier IIRC, and for the GNU 'find' -wholename
seems to be identical to -path, so I think this could be changed.
More information about the Hugs-Bugs