floating-point fix for x86_64
[ghc-hetmet.git] / ghc / compiler / javaGen / JavaGen.lhs
index e46a1c6..a3925b1 100644 (file)
@@ -47,7 +47,7 @@ module JavaGen( javaGen ) where
 import Java
 
 import Literal ( Literal(..) )
-import Id      ( Id, isDataConId_maybe, isId, idName, isDeadBinder, idPrimRep
+import Id      ( Id, isDataConWorkId_maybe, isId, idName, isDeadBinder, idPrimRep
                , isPrimOpId_maybe )
 import Name    ( NamedThing(..), getOccString, isExternalName, isInternalName
                , nameModule )
@@ -66,7 +66,7 @@ import Outputable
 
 import Maybe
 import PrimOp
-import Util     ( lengthIs )
+import Util     ( lengthIs, notNull )
 
 #include "HsVersions.h"
 
@@ -228,7 +228,7 @@ javaLit (MachInt i)  = Literal (IntLit (fromInteger i))
 javaLit (MachChar c) = Literal (CharLit c)
 javaLit (MachStr fs) = Literal (StringLit str)
    where
-       str = concatMap renderString (_UNPK_ fs) ++ "\\000"
+       str = concatMap renderString (unpackFS fs) ++ "\\000"
        -- This should really handle all the chars 0..31.
        renderString '\NUL' = "\\000"
        renderString other  = [other]
@@ -267,7 +267,7 @@ javaCase :: (Expr -> Statement) -> CoreExpr -> Id -> [CoreAlt] -> [Statement]
 -- If we've got the wrong one, this is _|_, and the
 -- casting will catch this with an exception.
 
-javaCase r e x [(DataAlt d,bs,rhs)] | not (null bs)
+javaCase r e x [(DataAlt d,bs,rhs)] | notNull bs
   = java_expr PushExpr e ++
     [ var [Final] (javaName x)
                  (whnf primRep (vmPOP (primRepToType primRep))) ] ++
@@ -420,7 +420,7 @@ javaApp r (CoreSyn.App f a) as
        | isValArg a = javaApp r f (a:as)
        | otherwise  = javaApp r f as
 javaApp r (CoreSyn.Var f) as 
-  = case isDataConId_maybe f of {
+  = case isDataConWorkId_maybe f of {
        Just dc | as `lengthIs` dataConRepArity dc
         -- NOTE: Saturated constructors never returning a primitive at this point
         --
@@ -891,7 +891,7 @@ newtype LifterM a =
        LifterM { unLifterM ::
                     TypeName ->                -- this class name
                     Int ->                     -- uniq supply
-                         ( a                   -- *
+                         ( a                   --  *
                            , Frees             -- frees
                            , [Decl]            -- lifted classes
                            , Int               -- The uniqs