[project @ 2002-11-19 12:34:55 by simonpj]
[ghc-hetmet.git] / ghc / compiler / javaGen / JavaGen.lhs
index e46a1c6..55b2b71 100644 (file)
@@ -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))) ] ++