[Haskell-cafe] Very crazy

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Tue Sep 25 06:01:25 EDT 2007


On Sep 25, 2007, at 5:56 , Andrew Coppin wrote:

> More seriously, I have no idea how you'd implement this in Haskell.  
> Presumably the standard show instance for Int, Double, etc. is in  
> native C? You could probably reimplement it in Haskell for the  
> integer case, but not for floating-point...

Actually, Text.Printf is pure Haskell.  (Very *scary* Haskell:  deep  
type hackery is needed to make it work.  Don't try to understand  
PrintfType.  :)

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Haskell-Cafe mailing list