
4 Sep
2010
4 Sep
'10
5:26 p.m.
On 4 September 2010 18:04, Alec Benzer
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