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 {
10 import Complex; -- 1.3
12 type Complex_type = Complex Double;
13 type Array_type b = Array Int b;
14 type Assoc_type a = (Int, a);
15 type Descr_type = (Int,Int);
16 abortstr str = error ("abort:"++str); -- abort (OtherError str);
17 delay x = abortstr "delay not implemented";
18 fix f = fix_f where {fix_f = f fix_f};
19 force x = x; -- error "force not implemented";
20 iff b x y = if b then x else y;
21 iffrev y x b = if b then x else y;
22 seQ x y = seq_const y (x{-#STRICT-});
26 strcmp :: [Char] -> [Char] -> Bool;
28 entier x = fromIntegral (floor x);
29 land_i :: Int -> Int -> Int;
30 land_i x y = wordToInt (bitAnd (fromInt x) (fromInt y));
32 lnot_i x = wordToInt (bitCompl (fromInt x));
33 lor_i :: Int -> Int -> Int;
34 lor_i x y = wordToInt (bitOr (fromInt x) (fromInt y));
35 lshift_i :: Int -> Int -> Int;
36 lshift_i x y = wordToInt (bitLsh (fromInt x) y);
37 rshift_i :: Int -> Int -> Int;
38 rshift_i x y = wordToInt (bitRsh (fromInt x) 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)];