| However, I would guess that changing the type signature of 
| the current showInt function is unacceptable for Haskell'98.  
| Maybe we should consider adding the more general version 
| under a new name like showIntBase, together with 
| show{Dec,Oct,Hex}?  This would break no existing code, and 
| clear up the slight anomaly in the current capability of the 
| Haskell'98 library.

Hmm.  This is another unforced change, but admittedly to the libraries,
which have received much less attention and in some cases (like
this) look more accidental than deliberate.  So I've been using a lower
"bar" for modifications to the Libraries than to the Report.


As you say, we can't change the type of showInt.  I suppose we could
add:

showIntAtBase :: Integral a 
              => a            -- base
              -> (a -> Char)  -- digit to char
              -> a            -- number to show.
              -> ShowS

showOct, showHex :: Integral a => a -> ShowS


        Q1:  But would we really want showDec too?  
        Identical to existing showInt?

I am disinclined to use K-F's extra generality for H98, nice though it
is.
Too different from readInt.

Also, GHC's NumExts has 

doubleToFloat :: Double -> Float
floatToDouble :: Float  -> Double

        Q2:  If we are going to run round adding functions to 
        Numeric, should we add those too?  It's hard to know 
        where to stop... but if that conversion is what you want to
        do, H98 doesn't give a good way to do it.

Simon

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to