Adding support for CLDouble

Denys Rtveliashvili rtvd at mac.com
Sat Jan 9 17:33:26 EST 2010


Hi,

Currently ghc 6.12 does not have support for CLDouble type (and there is
an open issue on trac about it
http://hackage.haskell.org/trac/ghc/ticket/3353 ).

I have been trying to figure out what is necessary to add it. After
playing with the code a bit I've got a few questions...

1. Should there be a LDouble type, just like for CFloat and CDouble
there there are Haskell-native types Float and Double?

2. The ghc compiler references Float and Double in its code. When a
similar code is added for LDouble, the compiler does not get built. In
particular, 'compiler/coreSyn/CoreSyn.lhs' does not see 'LDouble'
despite I declared and exported it in 'libraries/ghc-prim/GHC/Types.hs'.
This probably makes sense in case compiler is built first. But then in
turns out to be a chicken and egg situation as to support a new type in
GHC one needs to have another GHC that already supports it. Or, perhaps,
I am missing something?

3.
http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/Registers mentions that there are registers for floats and doubles. What should be done about long doubles then?

With kind regards and hope that gurus may shed some light on the above,
Denys Rtveliashvili



More information about the Glasgow-haskell-users mailing list