mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-24 04:43:25 +03:00
Metavar solutions might contain 'let'
Mostly if they arise from search, where the target of the search has a let in the type. So, we need to consider this when checking metavariables in the linearity check.
This commit is contained in:
parent
d666ed50c9
commit
7dcb1cfd34
@ -1068,8 +1068,8 @@ prettyName : {auto c : Ref Ctxt Defs} ->
|
||||
Name -> Core String
|
||||
prettyName (Nested i n)
|
||||
= do i' <- toFullNames (Resolved i)
|
||||
pure (show !(prettyName i') ++ "," ++
|
||||
show !(prettyName n))
|
||||
pure (!(prettyName i') ++ "," ++
|
||||
!(prettyName n))
|
||||
prettyName (CaseBlock outer idx)
|
||||
= do outer' <- toFullNames (Resolved outer)
|
||||
pure ("case block in " ++ !(prettyName outer'))
|
||||
|
@ -607,8 +607,10 @@ mutual
|
||||
Core (Term vs)
|
||||
substMeta (Bind bfc n (Lam c e ty) sc) (a :: as) env
|
||||
= substMeta sc as (a :: env)
|
||||
substMeta (Bind bfc n (Let c val ty) sc) as env
|
||||
= substMeta (subst val sc) as env
|
||||
substMeta rhs [] env = pure (substs env rhs)
|
||||
substMeta rhs _ _ = throw (InternalError ("Badly formed metavar solution " ++ show n ++ " " ++ show rhs))
|
||||
substMeta rhs _ _ = throw (InternalError ("Badly formed metavar solution " ++ show n ++ " " ++ show fn))
|
||||
expandMeta rig erase env n idx def _
|
||||
= throw (InternalError ("Badly formed metavar solution " ++ show n ++ " " ++ show def))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user