Commit f4928d87 authored by sof's avatar sof
Browse files

[project @ 1998-08-14 12:57:49 by sof]

Specialise succ and pred
parent 9c5d0e22
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment