Skip to content
Snippets Groups Projects
Commit 83f7f7c6 authored by sof's avatar sof
Browse files

[project @ 1999-02-02 13:26:31 by sof]

- fixed Enum.fromEnumTo{Word32} to comply with H98 once again.
parent 87b82a02
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment