Add a uitest for pseudo-polymorphic specializations

This commit is contained in:
Ayaz Hafiz 2023-04-10 16:21:15 -05:00
parent 19c0ebc10f
commit 32d4b45557
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,17 @@
app "test" provides [main] to "./platform"
main =
foo : a, Bool -> Str
foo = \in, b -> if b then "done" else bar in
# ^^^ a -[[bar(2)]]-> Str
# ^^^ a, Bool -[[foo(1)]]-> Str
bar = \_ -> foo {} Bool.true
# ^^^ {}, Bool -[[]]-> Str
foo "" Bool.false
# ^^^{inst} Str, Bool -[[foo(1)]]-> Str
# │ foo : a, Bool -> Str
# │ foo = \in, b -> if b then "done" else bar in
# │ ^^^ Str -[[bar(2)]]-> Str
# │ ^^^ Str, Bool -[[foo(1)]]-> Str