
I was speaking more generally, not specifically about the Haskell
typeclasses Num and Enum (although actually irrational numbers aren't
enumerable now that I think of it, but I also guess that's a
relatively moot point since you can't really represent irrational
numbers in a programming language)
On Sat, Sep 4, 2010 at 1:26 PM, Ozgur Akgun
On 4 September 2010 18:04, Alec Benzer
wrote: What I mean is, if you had a function: something n = [1..n], and your type was a -> [a], a needs to be declared as (Num a, Enum a), even though this is sort of redundant, since you can't really have a number that isn't also enumerable.
Well, you can actually have a Num that isn't Enum.
ghci> :info Num class (Eq a, Show a) => Num a where (+) :: a -> a -> a (*) :: a -> a -> a (-) :: a -> a -> a negate :: a -> a abs :: a -> a signum :: a -> a fromInteger :: Integer -> a
-- Ozgur Akgun