[commit: ghc] wip/T10137: Remove Literal.onlyWithinBounds, not needed any more (4356473)

git at git.haskell.org git at git.haskell.org
Tue Mar 17 12:00:38 UTC 2015


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

On branch  : wip/T10137
Link       : http://ghc.haskell.org/trac/ghc/changeset/43564736edb645c2c3418e96df77abd37e9a7c20/ghc

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

commit 43564736edb645c2c3418e96df77abd37e9a7c20
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Mar 17 12:42:24 2015 +0100

    Remove Literal.onlyWithinBounds, not needed any more


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

43564736edb645c2c3418e96df77abd37e9a7c20
 compiler/basicTypes/Literal.hs | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/compiler/basicTypes/Literal.hs b/compiler/basicTypes/Literal.hs
index 8be78a2..08dfafe 100644
--- a/compiler/basicTypes/Literal.hs
+++ b/compiler/basicTypes/Literal.hs
@@ -30,7 +30,6 @@ module Literal
         , inIntRange, inWordRange, tARGET_MAX_INT, inCharRange
         , isZeroLit
         , litFitsInChar
-        , onlyWithinBounds
         , litValue
 
         -- ** Coercions
@@ -370,16 +369,6 @@ litIsLifted :: Literal -> Bool
 litIsLifted (LitInteger {}) = True
 litIsLifted _               = False
 
--- | x `onlyWithinBounds` (l,h) is true if l <= y < h ==> x = y
-onlyWithinBounds :: Literal -> (Literal, Literal) -> Bool
-onlyWithinBounds (MachChar   x) (MachChar   l, MachChar   h) = x == l && succ x == h
-onlyWithinBounds (MachInt    x) (MachInt    l, MachInt    h) = x == l && succ x == h
-onlyWithinBounds (MachWord   x) (MachWord   l, MachWord   h) = x == l && succ x == h
-onlyWithinBounds (MachInt64  x) (MachInt64  l, MachInt64  h) = x == l && succ x == h
-onlyWithinBounds (MachWord64 x) (MachWord64 l, MachWord64 h) = x == l && succ x == h
-onlyWithinBounds _ _ = False
-
-
 {-
         Types
         ~~~~~



More information about the ghc-commits mailing list