X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FLiteral.lhs;fp=ghc%2Fcompiler%2FbasicTypes%2FLiteral.lhs;h=f2d09f37334b2017848dc6af92255f7a1b6a5c46;hb=9208de5cd7f22942c0a72d34f9716427cda97bbe;hp=1b794a6faae24129889d0ac01ac36e9988ea2ce2;hpb=271502ff37a81fb5292056a1885c705192ef76c5;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/Literal.lhs b/ghc/compiler/basicTypes/Literal.lhs index 1b794a6..f2d09f3 100644 --- a/ghc/compiler/basicTypes/Literal.lhs +++ b/ghc/compiler/basicTypes/Literal.lhs @@ -289,8 +289,11 @@ litIsDupable (MachStr _) = False litIsDupable other = True litSize :: Literal -> Int - -- used by CoreUnfold.sizeExpr -litSize (MachStr str) = lengthFS str `div` 4 +-- Used by CoreUnfold.sizeExpr +litSize (MachStr str) = 1 + (lengthFS str `div` 4) + -- Every literal has size at least 1, otherwise + -- f "x" + -- might be too small litSize _other = 1 \end{code}