when faced with hard unification problem the type checker should just postpone the decision instead of failing immediately. added test case as well

This commit is contained in:
krasimir
2010-10-25 15:47:33 +00:00
parent aa6b07afdb
commit 0ba1daf5eb
4 changed files with 33 additions and 14 deletions

View File

@@ -0,0 +1,14 @@
abstract Hard = {
cat I ;
F (I -> I) ;
A (I -> I) I ;
S ;
fun
app : (f : I -> I) -> A f (f i) ;
ex : F (\x -> x) ;
i : I ;
s : (f : I -> I) -> A f i -> F f -> S ;
}

View File

@@ -0,0 +1,3 @@
i testsuite/runtime/typecheck/Hard.gf
ai s ? (app ?) ex
ai s ? (app ?) ?

View File

@@ -0,0 +1,5 @@
Expression: s (\v0 -> v0) (app (\v0 -> v0)) ex
Type: S
Meta variable(s) ?2 should be resolved
in the expression: s ?2 (app ?2) ?4