From 83f7f7c6999e9abe6b363a2edf9739d29ac959ca Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Tue, 2 Feb 1999 13:26:31 +0000
Subject: [PATCH] [project @ 1999-02-02 13:26:31 by sof] - fixed
 Enum.fromEnumTo{Word32} to comply with H98 once again.

---
 ghc/lib/exts/Word.lhs | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/ghc/lib/exts/Word.lhs b/ghc/lib/exts/Word.lhs
index 2b3c3477ce0a..6958a32b3bbf 100644
--- a/ghc/lib/exts/Word.lhs
+++ b/ghc/lib/exts/Word.lhs
@@ -659,17 +659,12 @@ instance Enum Word32 where
       = fromEnumError "Word32" x
 
     enumFrom w           = [w .. maxBound]
-    enumFromTo   w1 w2   = eftt32 increasing w1 diff_f last
+    enumFromTo   w1 w2
+       | w1 <= w2        = eftt32 True{-increasing-} w1 diff_f last
+       | otherwise	 = []
 	where
-	 increasing = w1 <= w2
-	 
-         last
-	  | increasing = (> w2)
-	  | otherwise  = (< w2)
-
-	 diff_f 
-	  | increasing = \ x -> x + 1
-	  | otherwise  = \ x -> x - 1
+         last = (> w2)
+	 diff_f x = x + 1 
 	  
     enumFromThen w1 w2   = [w1,w2 .. last]
        where
-- 
GitLab