[commit: ghc] master: Comparison primops return Int# (Fixes #6135) (6579a6c)

git at git.haskell.org git at git.haskell.org
Wed Aug 14 17:16:23 CEST 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/6579a6c73082387f82b994305011f011d9d8382b/ghc

>---------------------------------------------------------------

commit 6579a6c73082387f82b994305011f011d9d8382b
Author: Jan Stolarek <jan.stolarek at p.lodz.pl>
Date:   Wed Jul 3 15:23:37 2013 +0100

    Comparison primops return Int# (Fixes #6135)
    
    This patch modifies all comparison primops for Char#, Int#, Word#, Double#,
    Float# and Addr# to return Int# instead of Bool. A value of 1# represents True
    and 0# represents False. For a more detailed description of motivation for this
    change, discussion of implementation details and benchmarking results please
    visit the wiki page: http://hackage.haskell.org/trac/ghc/wiki/PrimBool
    
    There's also some cleanup: whitespace fixes in files that were extensively edited
    in this patch and constant folding rules for Integer div and mod operators (which
    for some reason have been left out up till now).


>---------------------------------------------------------------

6579a6c73082387f82b994305011f011d9d8382b
 compiler/codeGen/StgCmmExpr.hs    |    8 +-
 compiler/codeGen/StgCmmPrim.hs    |    9 --
 compiler/prelude/PrelNames.lhs    |  103 ++++++++++++-----------
 compiler/prelude/PrelRules.lhs    |  164 +++++++++++++++++++++++--------------
 compiler/prelude/PrimOp.lhs       |   15 ++--
 compiler/prelude/primops.txt.pp   |  100 +++++++++++-----------
 compiler/typecheck/TcDeriv.lhs    |   12 +--
 compiler/typecheck/TcGenDeriv.lhs |  110 +++++++++++++++----------
 docs/users_guide/7.8.1-notes.xml  |   16 ++++
 libraries/primitive               |    2 +-
 utils/genprimopcode/Main.hs       |    3 -
 utils/genprimopcode/Syntax.hs     |    2 +-
 12 files changed, 306 insertions(+), 238 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 6579a6c73082387f82b994305011f011d9d8382b




More information about the ghc-commits mailing list