Project

General

Profile

Revision e8f55c25 src/typing.ml

View differences:

src/typing.ml
259 259
	       else (fun c -> None) in
260 260
	     begin
261 261
	       unif t1' t2';
262
	       Dimension.eval Basic_library.eval_env eval_const e1;
263
	       Dimension.eval Basic_library.eval_env eval_const e2;
262
	       Dimension.eval Basic_library.eval_dim_env eval_const e1;
263
	       Dimension.eval Basic_library.eval_dim_env eval_const e2;
264 264
	       Dimension.unify ~semi:semi e1 e2;
265 265
	     end
266 266
          (* Special cases for machine_types. Rules to unify static types infered
......
359 359
	     then dimension_of_expr arg
360 360
	     else Dimension.mkdim_var () in
361 361
           let eval_const id = (* Types. *)get_static_value (Env.lookup_value (fst env) id) in
362
           Dimension.eval Basic_library.eval_env eval_const d;
362
           Dimension.eval Basic_library.eval_dim_env eval_const d;
363 363
           let real_static_type = (* Type_predef. *)type_static d ((* Types. *)dynamic_type targ) in
364 364
           (match (* Types. *)get_static_value targ with
365 365
            | None    -> ()
......
477 477
        | Expr_power (e1, d) ->
478 478
           let eval_const id = (* Types. *)get_static_value (Env.lookup_value (fst env) id) in
479 479
           type_subtyping_arg env in_main true (expr_of_dimension d) (* Type_predef. *)type_int;
480
           Dimension.eval Basic_library.eval_env eval_const d;
480
           Dimension.eval Basic_library.eval_dim_env eval_const d;
481 481
           let ty_elt = type_appl env in_main expr.expr_loc const "uminus" [e1] in
482 482
           let ty = (* Type_predef. *)type_array d ty_elt in
483 483
           expr.expr_type <- Expr_type_hub.export ty;
......
637 637
      let type_dim d =
638 638
        begin
639 639
          type_subtyping_arg (env, vd_env) false true (expr_of_dimension d) (* Type_predef. *)type_int;
640
          Dimension.eval Basic_library.eval_env eval_const d;
640
          Dimension.eval Basic_library.eval_dim_env eval_const d;
641 641
        end in
642 642
      let ty = type_coretype type_dim vdecl.var_dec_type.ty_dec_desc in
643 643

  

Also available in: Unified diff