mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 10:49:33 -06:00
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:
14
testsuite/runtime/typecheck/Hard.gf
Normal file
14
testsuite/runtime/typecheck/Hard.gf
Normal 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 ;
|
||||
|
||||
}
|
||||
3
testsuite/runtime/typecheck/hard-unification.gfs
Normal file
3
testsuite/runtime/typecheck/hard-unification.gfs
Normal file
@@ -0,0 +1,3 @@
|
||||
i testsuite/runtime/typecheck/Hard.gf
|
||||
ai s ? (app ?) ex
|
||||
ai s ? (app ?) ?
|
||||
5
testsuite/runtime/typecheck/hard-unification.gfs.gold
Normal file
5
testsuite/runtime/typecheck/hard-unification.gfs.gold
Normal 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
|
||||
Reference in New Issue
Block a user