[ auto ] try autos if a meta in their type is solved

Also cut tryEval if the result is a lambda
This commit is contained in:
2025-07-27 14:50:37 -07:00
parent ff23deb825
commit bcf34c0941
6 changed files with 132 additions and 33 deletions

View File

@@ -286,10 +286,19 @@ instance Show MetaKind where
show User = "User"
show AutoSolve = "Auto"
instance Eq MetaKind where
Normal == Normal = True
User == User = True
AutoSolve == AutoSolve = True
_ == _ = False
-- constrain meta applied to val to be a val
data MConstraint = MkMc FC Env (SnocList Val) Val
instance Show MConstraint where
show (MkMc fc env (args) ty) = "MkMC \{show fc} env \{show args} \{show ty}"
data MetaEntry
= Unsolved FC QName Context Val MetaKind (List MConstraint)
| Solved FC QName Val
@@ -308,6 +317,12 @@ record MetaContext where
next : Int
mcmode : MetaMode
instance Eq MetaMode where
CheckAll == CheckAll = True
CheckFirst == CheckFirst = True
NoCheck == NoCheck = True
_ == _ = False
data ConInfo = NormalCon | SuccCon | ZeroCon | EnumCon
instance Eq ConInfo where