Project

General

Profile

Revision 04a188ec src/basic_library.ml

View differences:

src/basic_library.ml
247 247
           Const_tag tag_true
248 248
         else
249 249
           Const_tag tag_false
250
      | "=", [Const_tag t1; Const_tag t2]
251
             ->
252
         if t1 = t2 then
253
           Const_tag tag_true
254
         else
255
           Const_tag tag_false
256
      | "!=", [Const_tag t1; Const_tag t2]
257
             ->
258
         if t1 = t2 then
259
           Const_tag tag_false
260
         else
261
           Const_tag tag_true
250 262
      | "not", [Const_tag c] -> Const_tag( if c = tag_true then tag_false else if c = tag_false then tag_true else assert false)
251 263
      | bool_fun, [Const_tag c1; Const_tag c2]
252 264
           when List.mem bool_fun bool_funs ->
253 265
         eval_bool_fun bool_fun c1 c2 
254
      | _ -> assert false
266
      | _ -> let loc= e.expr_loc in
267
             let err =Error.Unbound_symbol (op ^ (string_of_bool (List.mem op rel_funs)) ^ " in basic library") in
268
             raise (Error.Error (loc, err))
255 269
    in
256 270
    Expr_const new_cst 
257 271
  )       
......
285 299
                  (* Local Variables: *)
286 300
                  (* compile-command:"make -C .." *)
287 301
                  (* End: *)
302

  
303

  
304
let _ =
305
  (* Loading environement *)
306
  Global.type_env := type_env;
307
  Global.clock_env := clock_env

Also available in: Unified diff