Hello Luke and Community,
same error, I'am on Windows 7 with clean ide.
It seem, that mod is declared on StdOverloaded :
// Additional functions for integer arithmetic:
instance mod Int // arg1 modulo arg2
instance rem Int // remainder after integer division
instance gcd Int // Greatest common divider
There are another file StdInt, we have rem and gcd :
// Additional functions for integer arithmetic:
instance rem Int
where
(rem) a b
= code inline {
remI
}
instance gcd Int
where
gcd x y = gcdnat (abs x) (abs y)
where
gcdnat x 0 = x
gcdnat x y = gcdnat y (x rem y)
but it seem, unfortunately no mod ?
Maybe a professional of clean can answer better than I do.
Best
Loic
On Mon, Jul 7, 2014 at 5:53 PM, Luke Immes <[email protected]> wrote:
> Documentation makes reference to required modules, but 'mod' is still not
> working.
>
> Any suggestions? Thanks.
>
>
> clean 496>cat mymod.icl
>
> module mymod
>
> import StdEnv, StdInt, StdClass
>
> Start :: [Int]
>
> Start = [x*x \\ x <- [1..10] | x mod 2 == 0]
>
> ---------
>
> clean 495>make mymod
>
> clm -h 20m mymod -o mymod
>
> Compiling mymod
>
> Overloading error [mymod.icl,4,c;4;14]: "mod" no instance available of
> type Int
>
> make: *** [mymod] Error 1
>
> _______________________________________________
> clean-list mailing list
> [email protected]
> http://mailman.science.ru.nl/mailman/listinfo/clean-list
>
>
_______________________________________________
clean-list mailing list
[email protected]
http://mailman.science.ru.nl/mailman/listinfo/clean-list