Closed buzden closed 6 months ago
Consider the following code:
import Language.Reflection (.fun) : Nat -> Nat x : TTImp f : Nat -> TTImp useX : TTImp useX = `(g (~x).fun) useX' : TTImp useX' = `(g ~x.fun) useFX : TTImp useFX = `(g (~(f 5)).fun) useFX' : TTImp useFX' = `(g ~(f 5).fun)
All use* function typecheck successfully, primed and un-primed variants having the same meaning.
use*
Primed versions do not typecheck:
Error: While processing right hand side of useX'. When unifying: TTImp and: Nat Mismatch between: TTImp and Nat. X:13:14--13:15 09 | useX : TTImp 10 | useX = `(g (~x).fun) 11 | 12 | useX' : TTImp 13 | useX' = `(g ~x.fun) ^
Error: While processing right hand side of useFX'. When unifying: TTImp and: Nat Mismatch between: TTImp and Nat. X:19:16--19:19 15 | useFX : TTImp 16 | useFX = `(g (~(f 5)).fun) 17 | 18 | useFX' : TTImp 19 | useFX' = `(g ~(f 5).fun) ^^^
Seems like (.fun) function was tried to be applied to the TTImp being unquoted, despite being outside the unquote brackets.
(.fun)
TTImp
I believe this is fixed by #3253.
Steps to Reproduce
Consider the following code:
Expected Behavior
All
use*
function typecheck successfully, primed and un-primed variants having the same meaning.Observed Behavior
Primed versions do not typecheck:
Seems like
(.fun)
function was tried to be applied to theTTImp
being unquoted, despite being outside the unquote brackets.