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:
9c5d0e2
)
[project @ 1998-08-14 12:57:49 by sof]
author
sof
<unknown>
Fri, 14 Aug 1998 12:57:49 +0000
(12:57 +0000)
committer
sof
<unknown>
Fri, 14 Aug 1998 12:57:49 +0000
(12:57 +0000)
Specialise succ and pred
ghc/lib/std/PrelBase.lhs
patch
|
blob
|
history
diff --git
a/ghc/lib/std/PrelBase.lhs
b/ghc/lib/std/PrelBase.lhs
index
6ef5044
..
ba5741b
100644
(file)
--- a/
ghc/lib/std/PrelBase.lhs
+++ b/
ghc/lib/std/PrelBase.lhs
@@
-224,6
+224,8
@@
class (Eq a, Show a, Eval a) => Num a where
\end{code}
\begin{code}
+{-# SPECIALISE succ :: Int -> Int #-}
+{-# SPECIALISE pred :: Int -> Int #-}
succ, pred :: Enum a => a -> a
succ = toEnum . (+1) . fromEnum
pred = toEnum . (subtract 1) . fromEnum