X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FjavaGen%2FJavaGen.lhs;h=55b2b716c128734d9951dd31d662f22df7c7863c;hb=f279803f7a5eb9b9fb7720e96b0ebbb2df65ee4f;hp=e46a1c64e7c7367d160aac9428e2ae9b14a7a1a2;hpb=9003a18c4efa4548ae80709aef9963f7b544ded3;p=ghc-hetmet.git diff --git a/ghc/compiler/javaGen/JavaGen.lhs b/ghc/compiler/javaGen/JavaGen.lhs index e46a1c6..55b2b71 100644 --- a/ghc/compiler/javaGen/JavaGen.lhs +++ b/ghc/compiler/javaGen/JavaGen.lhs @@ -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))) ] ++