@@ -683,16 +683,16 @@ end
683
683
" while the computation can perform effects" ^ nl() ^
684
684
tab() ^ code (show_type rt))
685
685
686
- let do_operation ~pos ~t1 :(_ ,lt ) ~t2 :(rexpr ,rt ) ~error :_ =
686
+ let do_operation ~pos ~t1 :(resume ,lt ) ~t2 :(_ ,rt ) ~error :_ =
687
687
build_tyvar_names [lt;rt];
688
- let dropDoPrefix = Str. substitute_first (Str. regexp " do " ) (fun _ -> " " ) in
689
- let operation = dropDoPrefix (code rexpr ) in
690
- die pos (" Invocation of the operation " ^ nl () ^
691
- tab () ^ operation ^ nl() ^
692
- " requires an effect context " ^ nl () ^
693
- tab () ^ code (show_effectrow ( TypeUtils. extract_row rt) ) ^ nl() ^
694
- " but, the currently allowed effects are " ^ nl ()
695
- ^ tab () ^ code ( show_effectrow ( TypeUtils. extract_row lt) ))
688
+ let dropDoPrefix = Str. substitute_first (Str. regexp { |^ \(lin\)? do | } ) (fun _ -> " " ) in
689
+ let operation = code (dropDoPrefix resume ) in
690
+ die pos (" Invocation of the operation" ^ nli () ^
691
+ operation ^ nl() ^
692
+ " requires an effect context" ^ nli () ^
693
+ code (show_type lt ) ^ nl() ^
694
+ " but, the currently allowed effect is " ^ nli ()
695
+ ^ code (show_type rt ))
696
696
697
697
let try_effect ~pos ~t1 :(_ ,lt ) ~t2 :(_ ,rt ) ~error :_ =
698
698
build_tyvar_names [lt;rt];
@@ -4592,7 +4592,7 @@ let rec type_check : context -> phrase -> phrase * Types.datatype * Usage.t =
4592
4592
unify ~handle: Gripers. do_operation
4593
4593
(term, infer_opt) ;
4594
4594
unify ~handle: Gripers. do_operation
4595
- (no_pos ( T. Effect context.effect_row ), (p, T. Effect row ))
4595
+ ((p, T. Effect row ), no_pos ( T. Effect context.effect_row ))
4596
4596
in
4597
4597
(* postponed *)
4598
4598
(* let () = if is_lindo then () *)
0 commit comments