2 Complex_type, Array_type, Assoc_type, Descr_type,
3 abortstr, delay, fix, force, iff, iffrev, seQ,
6 land_i, lnot_i, lor_i, lshift_i, rshift_i,
8 destr_update, indassoc, lowbound, tabulate, upbound, update, valassoc) where {
11 import Complex; -- 1.3
13 import Int ( Num(fromInt) );
14 type Complex_type = Complex Double;
15 type Array_type b = Array Int b;
16 type Assoc_type a = (Int, a);
17 type Descr_type = (Int,Int);
18 abortstr str = error ("abort:"++str); -- abort (OtherError str);
19 delay x = abortstr "delay not implemented";
20 fix f = fix_f where {fix_f = f fix_f};
21 force x = x; -- error "force not implemented";
22 iff b x y = if b then x else y;
23 iffrev y x b = if b then x else y;
27 strcmp :: [Char] -> [Char] -> Bool;
29 entier x = fromIntegral (floor x);
30 land_i :: Int -> Int -> Int;
31 land_i x y = wordToInt (fromInt x .&. fromInt y);
33 lnot_i x = wordToInt (complement (fromInt x));
34 lor_i :: Int -> Int -> Int;
35 lor_i x y = wordToInt (fromInt x .|. fromInt y);
36 lshift_i :: Int -> Int -> Int;
37 lshift_i x y = wordToInt (fromInt x `shiftL` y);
38 rshift_i :: Int -> Int -> Int;
39 rshift_i x y = wordToInt (fromInt x `shiftR` y);
40 write x = abortstr "write not implemented";
42 destr_update ar i x = ar // [(i,x)];
45 tabulate f (l,u) = listArray (l,u) [f i | i <- [l..u]];
47 update ar i x = ar // [(i,x)];