<br><div class="gmail_quote">On 4 September 2010 18:04, Alec Benzer <span dir="ltr"><<a href="mailto:alecbenzer@gmail.com">alecbenzer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div id=":24n">What I mean is, if you had a function: something n =<br>
[1..n], and your type was a -> [a], a needs to be declared as (Num a,<br>
Enum a), even though this is sort of redundant, since you can't really<br>
have a number that isn't also enumerable. </div></blockquote></div><br>Well, you can actually have a Num that isn't Enum.<br><br><span style="font-family: courier new,monospace;">ghci> :info Num</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">class (Eq a, Show a) => Num a where</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> (+) :: a -> a -> a</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> (*) :: a -> a -> a</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> (-) :: a -> a -> a</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> negate :: a -> a</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> abs :: a -> a</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> signum :: a -> a</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> fromInteger :: Integer -> a</span><br><br clear="all">
<br>-- <br>Ozgur Akgun<br>