X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fstd%2FPrelBase.lhs;h=8ff06b7fe86359da4e516c75e0b6cebb7d0d3fbe;hb=fc0ea62713a45e0004927195946746c1bcebe0ef;hp=1d6d69dbc78fa37fb3d33d2fb54c13f6b662877b;hpb=c837c7ef0990071a3f64a35a62072d5b97269bc7;p=ghc-hetmet.git diff --git a/ghc/lib/std/PrelBase.lhs b/ghc/lib/std/PrelBase.lhs index 1d6d69d..8ff06b7 100644 --- a/ghc/lib/std/PrelBase.lhs +++ b/ghc/lib/std/PrelBase.lhs @@ -377,7 +377,7 @@ instance Enum Char where enumFrom (C# c) = efttCh (ord# c) 1# (># 255#) enumFromTo (C# c1) (C# c2) | c1 `leChar#` c2 = efttCh (ord# c1) 1# (># (ord# c2)) - | otherwise = efttCh (ord# c1) (negateInt# 1#) (<# (ord# c2)) + | otherwise = [] enumFromThen (C# c1) (C# c2) | c1 `leChar#` c2 = efttCh (ord# c1) (ord# c2 -# ord# c1) (># 255#) @@ -521,8 +521,8 @@ instance Enum Int where enumFrom (I# c) = efttInt True c 1# (\ _ -> False) enumFromTo (I# c1) (I# c2) - | c1 <# c2 = efttInt True c1 1# (># c2) - | otherwise = efttInt False c1 (negateInt# 1#) (<# c2) + | c1 <=# c2 = efttInt True c1 1# (># c2) + | otherwise = [] enumFromThen (I# c1) (I# c2) | c1 <# c2 = efttInt True c1 (c2 -# c1) (\ _ -> False)