diff options
| author | Jon French | 2018-05-16 16:28:31 +0100 |
|---|---|---|
| committer | Jon French | 2018-05-16 16:28:31 +0100 |
| commit | 466c3936bcef6518503a216bcb583f89e8979643 (patch) | |
| tree | f28e0c825288b2416e090e202c5a57d21a78d3b2 /src | |
| parent | a7563156f1ea9ca71c2d4cd0de4bad67f0f99b30 (diff) | |
fix a couple warnings in type_check.ml
Diffstat (limited to 'src')
| -rw-r--r-- | src/type_check.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/type_check.ml b/src/type_check.ml index fbec5111..3bdf9953 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -725,7 +725,7 @@ end = struct let typ_aux = match typ_aux with | Typ_tup _ | Typ_app _ -> Typ_exist (existentials, List.fold_left nc_and (List.hd constrs) (List.tl constrs), typ) | Typ_exist (kids, nc, typ) -> Typ_exist (kids @ existentials, List.fold_left nc_and nc constrs, typ) - | Typ_fn _ | Typ_id _ | Typ_var _ -> assert false (* These must be simple *) + | Typ_fn _ | Typ_bidir _ | Typ_id _ | Typ_var _ -> assert false (* These must be simple *) in Typ_aux (typ_aux, l) @@ -3668,6 +3668,8 @@ and bind_mpat env (MP_aux (mpat_aux, (l, ())) as mpat) (Typ_aux (typ_aux, _) as with | Unification_error (l, m) -> typ_error l ("Unification error when pattern matching against mapping constructor: " ^ m) end + | Typ_aux (typ, _) -> + typ_error l ("unifying mapping type, expanded synonyms to non-mapping type??") end | MP_app (f, _) when not (Env.is_union_constructor f env || Env.is_mapping f env)-> typ_error l (string_of_id f ^ " is not a union constructor or mapping in mapping-pattern " ^ string_of_mpat mpat) |
