Skip to content

Commit

Permalink
do not try to support subtyping between a restriction type & non-rest…
Browse files Browse the repository at this point in the history
…riction type
  • Loading branch information
jonsterling committed Aug 14, 2018
1 parent 18a56fb commit f4df7db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 2 additions & 8 deletions src/core/Quote.ml
Original file line number Diff line number Diff line change
Expand Up @@ -749,15 +749,9 @@ struct

and fancy_subtype env ty0 sys0 ty1 sys1 =
match unleash ty0, unleash ty1 with
| _, Rst rst1 ->
fancy_subtype env ty0 sys0 rst1.ty (rst1.sys @ sys1)

| Rst rst0, _ ->
| Rst rst0, Rst rst1 ->
begin
(* backtracking :( ) *)
try fancy_subtype env rst0.ty sys0 ty1 sys1
with _ ->
fancy_subtype env rst0.ty (rst0.sys @ sys0) ty1 sys1
fancy_subtype env rst0.ty (rst0.sys @ sys0) ty1 (rst1.sys @ sys1)
end

| Pi pi0, Pi pi1 ->
Expand Down
3 changes: 0 additions & 3 deletions src/frontend/Unify.ml
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,6 @@ let rec subtype ty0 ty1 =
| Tm.Rst rst0, Tm.Rst rst1 ->
restriction_subtype rst0.ty rst0.sys rst1.ty rst1.sys

| Tm.Rst _, _ ->
active @@ Subtype {ty0; ty1 = Tm.make @@ Tm.Rst {ty = ty1; sys = []}}

| _ ->
active @@ Problem.eqn ~ty0:univ ~ty1:univ ~tm0:ty0 ~tm1:ty1

Expand Down

0 comments on commit f4df7db

Please sign in to comment.