Repository : ssh://darcs.haskell.org//srv/darcs/packages/ghc-prim

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/dbe66a7ea2e109d3c7744badf5e0b434f3d0f2a7

>---------------------------------------------------------------

commit dbe66a7ea2e109d3c7744badf5e0b434f3d0f2a7
Author: Johan Tibell <[email protected]>
Date:   Thu Dec 6 10:58:37 2012 -0800

    Add word2float

>---------------------------------------------------------------

 cbits/word2float.c |   15 +++++++++++++++
 ghc-prim.cabal     |    1 +
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/cbits/word2float.c b/cbits/word2float.c
new file mode 100644
index 0000000..2ca7fea
--- /dev/null
+++ b/cbits/word2float.c
@@ -0,0 +1,15 @@
+#include "Rts.h"
+
+extern StgFloat hs_word2float32(StgWord x);
+StgFloat
+hs_word2float32(StgWord x)
+{
+  return x;
+}
+
+extern StgDouble hs_word2float64(StgWord x);
+StgDouble
+hs_word2float64(StgWord x)
+{
+  return x;
+}
diff --git a/ghc-prim.cabal b/ghc-prim.cabal
index 9c74361..24eacd6 100644
--- a/ghc-prim.cabal
+++ b/ghc-prim.cabal
@@ -40,6 +40,7 @@ Library {
         cbits/debug.c
         cbits/longlong.c
         cbits/popcnt.c
+        cbits/word2float.c
     extensions: CPP, MagicHash, ForeignFunctionInterface, UnliftedFFITypes,
                 UnboxedTuples, EmptyDataDecls, NoImplicitPrelude
     -- We need to set the package name to ghc-prim (without a version number)



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to