mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 06:52:19 +03:00
Change genSym behaviour
Instead of merely generating a locally unique name, use the existing code for generating a new unique variable name in the unifier, which is therefore globally unique.
This commit is contained in:
parent
e7f8e2df8c
commit
c3ee2a3fac
@ -84,8 +84,8 @@ elabScript fc nest env (NDCon nfc nm t ar args) exp
|
||||
scriptRet (Just !(unelabNoSugar env ty))
|
||||
elabCon defs "GenSym" [str]
|
||||
= do str' <- evalClosure defs str
|
||||
n <- uniqueName defs [] !(reify defs str')
|
||||
scriptRet (UN n)
|
||||
n <- genVarName !(reify defs str')
|
||||
scriptRet n
|
||||
elabCon defs "InCurrentNS" [n]
|
||||
= do n' <- evalClosure defs n
|
||||
nsn <- inCurrentNS !(reify defs n')
|
||||
|
@ -12,4 +12,4 @@ Error during reflection: Still not trying
|
||||
refprims.idr:43:10--45:1:While processing right hand side of dummy3 at refprims.idr:43:1--45:1:
|
||||
Error during reflection: Undefined name
|
||||
refprims.idr:46:10--48:1:While processing right hand side of dummy4 at refprims.idr:46:1--48:1:
|
||||
Error during reflection: failed after generating Main.plus_1
|
||||
Error during reflection: failed after generating Main.{plus:5817}
|
||||
|
Loading…
Reference in New Issue
Block a user