From: sof Date: Tue, 3 Jun 1997 22:29:15 +0000 (+0000) Subject: [project @ 1997-06-03 22:29:15 by sof] X-Git-Tag: Approximately_1000_patches_recorded~437 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b1c0db25ce2b46933b0205de213191ada7334558;p=ghc-hetmet.git [project @ 1997-06-03 22:29:15 by sof] toEnum and fromEnum methods added to the Enum Integer instance --- diff --git a/ghc/lib/ghc/PrelNum.lhs b/ghc/lib/ghc/PrelNum.lhs index 9d205d7..e329d74 100644 --- a/ghc/lib/ghc/PrelNum.lhs +++ b/ghc/lib/ghc/PrelNum.lhs @@ -335,6 +335,8 @@ instance Integral Integer where -- Case-ified by WDP 94/10 instance Enum Integer where + toEnum n = toInteger n + fromEnum n = toInt n enumFrom n = n : enumFrom (n + 1) enumFromThen m n = en' m (n - m) where en' m n = m : en' (m + n) n