From 835564a79b091f7e17d794425655ec2aa7ca6ca7 Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 31 Aug 1999 15:29:00 +0000 Subject: [PATCH] [project @ 1999-08-31 15:29:00 by simonpj] Fix default Enum methods --- ghc/lib/std/PrelEnum.lhs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc/lib/std/PrelEnum.lhs b/ghc/lib/std/PrelEnum.lhs index 8d88920..2ace283 100644 --- a/ghc/lib/std/PrelEnum.lhs +++ b/ghc/lib/std/PrelEnum.lhs @@ -43,8 +43,10 @@ class Enum a where succ = toEnum . (`plusInt` oneInt) . fromEnum pred = toEnum . (`minusInt` oneInt) . fromEnum - enumFromTo n m = map toEnum [fromEnum n .. fromEnum m] - enumFromThenTo n1 n2 m = map toEnum [fromEnum n1, fromEnum n2 .. fromEnum m] + enumFrom x = map toEnum [fromEnum x ..] + enumFromThen x y = map toEnum [fromEnum x, fromEnum y ..] + enumFromTo x y = map toEnum [fromEnum x .. fromEnum y] + enumFromThenTo x1 x2 y = map toEnum [fromEnum x1, fromEnum x2 .. fromEnum y] -- Default methods for bounded enumerations enumFromBounded :: (Enum a, Bounded a) => a -> [a] -- 1.7.10.4