>       Of course, I can easily use the +, *, and - operators with any type of
> number, but now I'm trying to use div, mod, quot, and rem.  The Haskell manual
> I have indicates they should work with Integrals, but I get the following:
> 
> > 4 div 2;
> [56] Not an instance Num ((a -> a -> a) -> b) in  fromInteger 4I div
> 
> 
> > 4 mod 2;
> [56] Not an instance Num ((a -> a -> a) -> b) in  fromInteger 4I mod
> 
> 
> > 4 quot 2;
> [56] Not an instance Num ((a -> a -> a) -> b) in  fromInteger 4I quot
> 
> 
> > 4 rem 2;
> [56] Not an instance Num ((a -> a -> a) -> b) in  fromInteger 4I rem
> 

These are perfix operators.
Just try "rem 4 2", "quot 4 2" etc... or use the infix versions (surrounded with 
simple backquotes) "4 `rem` 2", "4 `quot` 2" ....

Eric


Reply via email to