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 type Complex_type = Complex Double;
14 type Array_type b = Array Int b;
15 type Assoc_type a = (Int, a);
16 type Descr_type = (Int,Int);
17 abortstr str = error ("abort:"++str); -- abort (OtherError str);
18 delay x = abortstr "delay not implemented";
19 fix f = fix_f where {fix_f = f fix_f};
20 force x = x; -- error "force not implemented";
21 iff b x y = if b then x else y;
22 iffrev y x b = if b then x else y;
26 strcmp :: [Char] -> [Char] -> Bool;
28 entier x = fromIntegral (floor x);
29 land_i :: Int -> Int -> Int;
30 land_i x y = wordToInt (fromInt x .&. fromInt y);
32 lnot_i x = wordToInt (complement (fromInt x));
33 lor_i :: Int -> Int -> Int;
34 lor_i x y = wordToInt (fromInt x .|. fromInt y);
35 lshift_i :: Int -> Int -> Int;
36 lshift_i x y = wordToInt (fromInt x `shiftL` y);
37 rshift_i :: Int -> Int -> Int;
38 rshift_i x y = wordToInt (fromInt x `shiftR` y);
39 write x = abortstr "write not implemented";
41 destr_update ar i x = ar // [(i,x)];
44 tabulate f (l,u) = listArray (l,u) [f i | i <- [l..u]];
46 update ar i x = ar // [(i,x)];