1
0
forked from GitHub/gf-core

overload pgf.Type for backward compatibility and support for dependent and simple types

This commit is contained in:
krangelov
2021-10-16 19:50:01 +02:00
parent 5ee960ed7c
commit 382456415e
3 changed files with 120 additions and 42 deletions

View File

@@ -215,6 +215,18 @@ def test_showType_9(PGF):
type = Type([mkDepHypo("x", Type([], "N", [])), mkDepHypo("y", Type([], "P", [ExprVar(0)]))], "S", [])
assert showType(["n"], type) == "(x : N) -> (y : P x) -> S"
def test_Type_overloading_1(PGF):
assert Type([],"A",[]) == Type("A")
def test_Type_overloading_2(PGF):
assert Type([(True,"_",Type("A"))],"B",[]) == Type(["A"],"B")
def test_Type_overloading_3(PGF):
assert Type([(True,"_",Type("A"))],"B",[]) == Type([Type("A")],"B")
def test_Type_overloading_4(PGF):
assert Type([],"A",[Expr(3)]) == Type("A",[Expr(3)])
def test_Type_getters():
h0 = mkDepHypo("x", Type([], "N", []))
e0 = ExprVar(0)