projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c34971
)
[project @ 1997-06-03 22:29:15 by sof]
author
sof
<unknown>
Tue, 3 Jun 1997 22:29:15 +0000
(22:29 +0000)
committer
sof
<unknown>
Tue, 3 Jun 1997 22:29:15 +0000
(22:29 +0000)
toEnum and fromEnum methods added to the Enum Integer instance
ghc/lib/ghc/PrelNum.lhs
patch
|
blob
|
history
diff --git
a/ghc/lib/ghc/PrelNum.lhs
b/ghc/lib/ghc/PrelNum.lhs
index
9d205d7
..
e329d74
100644
(file)
--- 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