Commits

camlspotter committed 02443a9

merged and compiled. not tested

Comments (0)

Files changed (1)

typing/typecore.ml

   *)
   if rec_flag = Recursive then
     List.iter2
-<<<<<<< MINE
       (fun pat (_, sexp) ->
         (* the following [unify_pat] fails if the pattern is type-annotated with
            $-arrows and the corresponding $-absts are omitted in the
           | [], _ -> false
           | _ -> true
         in
-        if not pat_has_dabst then
-          unify_pat env pat (type_approx env sexp))
-||||||| ANCESTOR
-      (fun pat (_, sexp) -> unify_pat env pat (type_approx env sexp))
-=======
-      (fun pat (_, sexp) ->
         let pat =
           match pat.pat_type.desc with
           | Tpoly (ty, tl) ->
               {pat with pat_type = snd (instance_poly false tl ty)}
           | _ -> pat
-        in unify_pat env pat (type_approx env sexp))
->>>>>>> OTHER
+        in
+        if not pat_has_dabst then
+          unify_pat env pat (type_approx env sexp))
       pat_list spat_sexp_list;
   let pat_list =
     if !Clflags.principal then begin
   List.iter (fun f -> f()) force;
   let exp_env =
     match rec_flag with Nonrecursive | Default -> env | Recursive -> new_env in
-<<<<<<< MINE
 
   let spat_exp_dispatch_list =
     let defined_idents = 
         spat,
         (* reset dispatch info and enter the definition of pat *)
         Dispatch.Let.enter (Some pat) defined_idents (fun () ->
-          let d_abstable = Dispatch.pattern_may_have_implicit_dabst spat in
-          if d_abstable then 
-	    (* We here temporarily apply dispatch args 
-	       for the all $-absts. *)
-	    (* CR: We must perform the same thing like type_expect later *)
-	    type_exp exp_env sexp
-          else 
-	    (* We cannot have implicit $-absts, therefore we can use
-	       type_expect. *)
-            type_expect exp_env sexp pat.pat_type) )
+          match pat.pat_type.desc with
+          | Tpoly (ty, tl) ->
+              begin_def ();
+              let vars, ty' = instance_poly true tl ty in
+              let exp = type_expect exp_env sexp ty' in
+              end_def ();
+              check_univars env true "definition" exp pat.pat_type vars;
+              {exp with exp_type = instance exp.exp_type}
+          | _ ->
+              let d_abstable = Dispatch.pattern_may_have_implicit_dabst spat in
+              if d_abstable then 
+	        (* We here temporarily apply dispatch args 
+	           for the all $-absts. *)
+	        (* CR: We must perform the same thing like type_expect later *)
+	        type_exp exp_env sexp
+              else 
+	        (* We cannot have implicit $-absts, therefore we can use
+	           type_expect. *)
+                type_expect exp_env sexp pat.pat_type) )
 	  spat_sexp_list pat_list
   in
 
     Dispatch.Recursives.fix_calls ~at:pat0 abstracts id_types)
     pat0_list abstracts_list;
 
-||||||| ANCESTOR
-  let exp_list =
-    List.map2
-      (fun (spat, sexp) pat -> type_expect exp_env sexp pat.pat_type)
-      spat_sexp_list pat_list in
-=======
-  let exp_list =
-    List.map2
-      (fun (spat, sexp) pat ->
-        match pat.pat_type.desc with
-        | Tpoly (ty, tl) ->
-            begin_def ();
-            let vars, ty' = instance_poly true tl ty in
-            let exp = type_expect exp_env sexp ty' in
-            end_def ();
-            check_univars env true "definition" exp pat.pat_type vars;
-            {exp with exp_type = instance exp.exp_type}
-        | _ -> type_expect exp_env sexp pat.pat_type)
-      spat_sexp_list pat_list in
->>>>>>> OTHER
   List.iter2
     (fun pat exp -> ignore(Parmatch.check_partial pat.pat_loc [pat, exp]))
     pat_list exp_list;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.