Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/3af022f3ae6ff3adceb2318cf50549d954e8bbe7

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

commit 3af022f3ae6ff3adceb2318cf50549d954e8bbe7
Author: Simon Marlow <marlo...@gmail.com>
Date:   Wed Jan 9 16:52:16 2013 +0000

    Fix some incorrect narrowing rules (#7361)
    
    e.g. narrow8Int# subsumes narrow16Int#, not the other way around.

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

 compiler/prelude/PrelRules.lhs |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/compiler/prelude/PrelRules.lhs b/compiler/prelude/PrelRules.lhs
index b58eb0a..b21d546 100644
--- a/compiler/prelude/PrelRules.lhs
+++ b/compiler/prelude/PrelRules.lhs
@@ -142,28 +142,28 @@ primOpRules nm Int2WordOp     = mkPrimOpRule nm 1 [ 
liftLitDynFlags int2WordLit
                                                   , inversePrimOp Word2IntOp ]
 primOpRules nm Narrow8IntOp   = mkPrimOpRule nm 1 [ liftLit narrow8IntLit
                                                   , subsumedByPrimOp 
Narrow8IntOp
-                                                  , subsumedByPrimOp 
Narrow16IntOp
-                                                  , subsumedByPrimOp 
Narrow32IntOp ]
+                                                  , Narrow8IntOp 
`subsumesPrimOp` Narrow16IntOp
+                                                  , Narrow8IntOp 
`subsumesPrimOp` Narrow32IntOp ]
 primOpRules nm Narrow16IntOp  = mkPrimOpRule nm 1 [ liftLit narrow16IntLit
-                                                  , Narrow16IntOp 
`subsumesPrimOp` Narrow8IntOp
+                                                  , subsumedByPrimOp 
Narrow8IntOp
                                                   , subsumedByPrimOp 
Narrow16IntOp
-                                                  , subsumedByPrimOp 
Narrow32IntOp ]
+                                                  , Narrow16IntOp 
`subsumesPrimOp` Narrow32IntOp ]
 primOpRules nm Narrow32IntOp  = mkPrimOpRule nm 1 [ liftLit narrow32IntLit
-                                                  , Narrow32IntOp 
`subsumesPrimOp` Narrow8IntOp
-                                                  , Narrow32IntOp 
`subsumesPrimOp` Narrow16IntOp
+                                                  , subsumedByPrimOp 
Narrow8IntOp
+                                                  , subsumedByPrimOp 
Narrow16IntOp
                                                   , subsumedByPrimOp 
Narrow32IntOp
                                                   , removeOp32 ]
 primOpRules nm Narrow8WordOp  = mkPrimOpRule nm 1 [ liftLit narrow8WordLit
                                                   , subsumedByPrimOp 
Narrow8WordOp
-                                                  , subsumedByPrimOp 
Narrow16WordOp
-                                                  , subsumedByPrimOp 
Narrow32WordOp ]
+                                                  , Narrow8WordOp 
`subsumesPrimOp` Narrow16WordOp
+                                                  , Narrow8WordOp 
`subsumesPrimOp` Narrow32WordOp ]
 primOpRules nm Narrow16WordOp = mkPrimOpRule nm 1 [ liftLit narrow16WordLit
-                                                  , Narrow16WordOp 
`subsumesPrimOp` Narrow8WordOp
+                                                  , subsumedByPrimOp 
Narrow8WordOp
                                                   , subsumedByPrimOp 
Narrow16WordOp
-                                                  , subsumedByPrimOp 
Narrow32WordOp ]
+                                                  , Narrow16WordOp 
`subsumesPrimOp` Narrow32WordOp ]
 primOpRules nm Narrow32WordOp = mkPrimOpRule nm 1 [ liftLit narrow32WordLit
-                                                  , Narrow32WordOp 
`subsumesPrimOp` Narrow8WordOp
-                                                  , Narrow32WordOp 
`subsumesPrimOp` Narrow16WordOp
+                                                  , subsumedByPrimOp 
Narrow8WordOp
+                                                  , subsumedByPrimOp 
Narrow16WordOp
                                                   , subsumedByPrimOp 
Narrow32WordOp
                                                   , removeOp32 ]
 primOpRules nm OrdOp          = mkPrimOpRule nm 1 [ liftLit char2IntLit



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to