forked from GitHub/gf-core
overload pgf.Type for backward compatibility and support for dependent and simple types
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user