_+_ works with an Add typeclass now.

- add test case
- fix some issues with eval
- filter out non-candidates for auto search
This commit is contained in:
2024-10-26 21:39:25 -07:00
parent 44dd074a79
commit 95a4baf12d
5 changed files with 65 additions and 8 deletions

View File

@@ -67,11 +67,12 @@ tryEval k sp =
v => pure $ Just v
_ => pure Nothing
-- Lennart needed more forcing for recursive nat,
-- Force far enough to compare types
forceType : Val -> M Val
forceType (VMeta fc ix sp) = case !(lookupMeta ix) of
(Unsolved x k xs _ _) => pure (VMeta fc ix sp)
(Solved k t) => vappSpine t sp >>= forceType
forceType x@(VRef fc nm _ sp) = fromMaybe x <$> tryEval nm sp
forceType x = pure x
public export