Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/54affcef5e0f269bdcca3c160e7d6bff065adb8c >--------------------------------------------------------------- commit 54affcef5e0f269bdcca3c160e7d6bff065adb8c Author: Ian Lynagh <[email protected]> Date: Wed Sep 19 23:23:48 2012 +0100 Fix litFitsInChar It was always False before >--------------------------------------------------------------- compiler/basicTypes/Literal.lhs | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/basicTypes/Literal.lhs b/compiler/basicTypes/Literal.lhs index 220ef9e..a590eae 100644 --- a/compiler/basicTypes/Literal.lhs +++ b/compiler/basicTypes/Literal.lhs @@ -351,10 +351,9 @@ litIsDupable dflags (LitInteger i _) = inIntRange dflags i litIsDupable _ _ = True litFitsInChar :: Literal -> Bool -litFitsInChar (MachInt i) - = fromInteger i <= ord minBound - && fromInteger i >= ord maxBound -litFitsInChar _ = False +litFitsInChar (MachInt i) = i >= toInteger (ord minBound) + && i <= toInteger (ord maxBound) +litFitsInChar _ = False litIsLifted :: Literal -> Bool litIsLifted (LitInteger {}) = True _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
