Commits

camlspotter  committed 73718f4

pattern type constraint problem fixed

  • Participants
  • Parent commits 47ebb5f
  • Branches gcaml

Comments (0)

Files changed (2)

File typing/dispatch.ml

     match p.ppat_desc with
     | Ppat_any | Ppat_var _ -> true
     | Ppat_alias (p, _) -> pattern_may_have_implicit_dabst p
-    | Ppat_constraint _ -> false (* constraint should be fully $-abstracted *)
-    | Ppat_constant _ | Ppat_tuple _ | Ppat_construct _ | Ppat_variant _
-    | Ppat_record _ | Ppat_array _ | Ppat_type _ | Ppat_lazy _ 
-    | Ppat_or _ -> false
-
-  (* note that it is slightly different from the above *)        
-  let rec expression_may_have_implicit_dabst p =
-    match p.ppat_desc with
-    | Ppat_any | Ppat_var _ -> true
-    | Ppat_alias (p, _) -> expression_may_have_implicit_dabst p
-    | Ppat_constraint (p, _) -> expression_may_have_implicit_dabst p
+    | Ppat_constraint (p, _) -> pattern_may_have_implicit_dabst p
     | Ppat_constant _ | Ppat_tuple _ | Ppat_construct _ | Ppat_variant _
     | Ppat_record _ | Ppat_array _ | Ppat_type _ | Ppat_lazy _ 
     | Ppat_or _ -> false

File typing/dispatch.mli

     -> Env.t
 
   val pattern_may_have_implicit_dabst : Parsetree.pattern -> bool 
-  val expression_may_have_implicit_dabst : Parsetree.pattern -> bool 
 
   val rev_dabsts : Env.t
     -> type_expr