diff options
author | 2016-02-07 19:59:10 -0500 | |
---|---|---|
committer | 2016-02-07 19:59:10 -0500 | |
commit | 5579b84a97cb942fdfd4c4898793f9de95bc03d1 (patch) | |
tree | 2fd60da2fe681fa69d712efdeb36b720c72b9820 /src/mono_reduce.sml | |
parent | a777dd13f4075418ec883f4eb42e5de1739d50d1 (diff) |
Merge PVar and PWild, to get more reasonable type-class resolution
Diffstat (limited to 'src/mono_reduce.sml')
-rw-r--r-- | src/mono_reduce.sml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml index 61866af7..540d396b 100644 --- a/src/mono_reduce.sml +++ b/src/mono_reduce.sml @@ -191,8 +191,7 @@ datatype result = Yes of (string * typ * exp) list | No | Maybe fun match (env, p : pat, e : exp) = case (#1 p, #1 e) of - (PWild, _) => Yes env - | (PVar (x, t), _) => Yes ((x, t, e) :: env) + (PVar (x, t), _) => Yes ((x, t, e) :: env) | (PPrim (Prim.String (_, s)), EStrcat ((EPrim (Prim.String (_, s')), _), _)) => if String.isPrefix s' s then @@ -300,8 +299,7 @@ val p_events = Print.p_list p_event fun patBinds (p, _) = case p of - PWild => 0 - | PVar _ => 1 + PVar _ => 1 | PPrim _ => 0 | PCon (_, _, NONE) => 0 | PCon (_, _, SOME p) => patBinds p |