Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/f1c81a73366ead49129e744832023335e311e066 >--------------------------------------------------------------- commit f1c81a73366ead49129e744832023335e311e066 Author: Ian Lynagh <[email protected]> Date: Fri Jun 22 22:18:32 2012 +0100 Derive Eq Discr We had effectively hand-written the instance instead >--------------------------------------------------------------- compiler/ghci/ByteCodeGen.lhs | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs index 230c094..0587ed6 100644 --- a/compiler/ghci/ByteCodeGen.lhs +++ b/compiler/ghci/ByteCodeGen.lhs @@ -1305,7 +1305,7 @@ mkMultiBranch maybe_ncons raw_ways = do -- shouldn't happen? mkTree [val] range_lo range_hi - | range_lo `eqAlt` range_hi + | range_lo == range_hi = return (snd val) | null defaults -- Note [CASEFAIL] = do lbl <- getLabelBc @@ -1386,14 +1386,6 @@ mkMultiBranch maybe_ncons raw_ways = do Just n -> (0, fromIntegral n - 1) Nothing -> (minBound, maxBound) - (DiscrI i1) `eqAlt` (DiscrI i2) = i1 == i2 - (DiscrW w1) `eqAlt` (DiscrW w2) = w1 == w2 - (DiscrF f1) `eqAlt` (DiscrF f2) = f1 == f2 - (DiscrD d1) `eqAlt` (DiscrD d2) = d1 == d2 - (DiscrP i1) `eqAlt` (DiscrP i2) = i1 == i2 - NoDiscr `eqAlt` NoDiscr = True - _ `eqAlt` _ = False - (DiscrI i1) `leAlt` (DiscrI i2) = i1 <= i2 (DiscrW w1) `leAlt` (DiscrW w2) = w1 <= w2 (DiscrF f1) `leAlt` (DiscrF f2) = f1 <= f2 @@ -1431,6 +1423,7 @@ data Discr | DiscrD Double | DiscrP Word16 | NoDiscr + deriving Eq instance Outputable Discr where ppr (DiscrI i) = int i _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
