Store lambda set variables as flex inference variables

This is actually correct - the rigid approach is not. Lambda set
variables should be inferred in-scope.
This commit is contained in:
Ayaz Hafiz 2025-01-01 23:12:35 -06:00
parent 54cc5e4c29
commit 561f3d9711
No known key found for this signature in database
GPG key ID: 4EBD1C71C734E4D4
3 changed files with 9 additions and 12 deletions

View file

@ -7,7 +7,7 @@ main =
# ^^^ a, Bool -[[foo(1)]]-> Str
bar = \_ -> foo {} Bool.true
# ^^^ {}, Bool -[[]]-> Str
# ^^^ {}, Bool -[[foo(1)]]-> Str
foo "" Bool.false
# ^^^{inst} Str, Bool -[[foo(1)]]-> Str

View file

@ -5,8 +5,8 @@ main =
map : { f1: (I64 -> I64) } -> List I64
map = \{ f1 } -> List.concat [f1 1] (map { f1 })
# ^^^ { f1 : I64 -[[]]-> I64 } -[[map(2)]]-> List I64
# ^^^ { f1 : I64 -[[]]-> I64 } -[[map(2)]]-> List I64
# ^^^ { f1 : I64 -[[f(1)]]-> I64 } -[[map(2)]]-> List I64
# ^^^ { f1 : I64 -[[f(1)]]-> I64 } -[[map(2)]]-> List I64
map { f1: f }