mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-19 19:01:44 +03:00
Don't pass let bound things to with function
These are let bound things in the local environment, which could happen if the with clause is in a where block.
This commit is contained in:
parent
046498f926
commit
1119c089bf
@ -278,7 +278,12 @@ bindReq : {vs : _} ->
|
||||
List (PiInfo, Name) ->
|
||||
Term pre -> Maybe (List (PiInfo, Name), List Name, ClosedTerm)
|
||||
bindReq {vs} fc env SubRefl ns tm
|
||||
= pure (ns, reverse vs, abstractEnvType fc env tm)
|
||||
= pure (ns, notLets [] _ env, abstractEnvType fc env tm)
|
||||
where
|
||||
notLets : List Name -> (vars : List Name) -> Env Term vars -> List Name
|
||||
notLets acc [] _ = acc
|
||||
notLets acc (v :: vs) (Let _ _ _ :: env) = notLets acc vs env
|
||||
notLets acc (v :: vs) (_ :: env) = notLets (v :: acc) vs env
|
||||
bindReq {vs = n :: _} fc (b :: env) (KeepCons p) ns tm
|
||||
= do b' <- shrinkBinder b p
|
||||
bindReq fc env p ((plicit b, n) :: ns)
|
||||
|
Loading…
Reference in New Issue
Block a user