Commit Graph

12 Commits

Author SHA1 Message Date
Edwin Brady
f5962e1ea4 Update test output 2020-05-13 19:06:22 +01:00
Edwin Brady
ff86f6f834 Implement occurs check properly (finally!)
Instead of the previous unreliable hack, actually look for occurrences
of the solved metavariable. Block if there are any, and fail if there
are any under a constructor. I had expected this to hurt performance
quite a bit, but it seems it doesn't.
This was prompted by #304, which is now partly fixed, but there's still
a refinement to unification needed to fix it fully (and at least it
doesn't segfault due to the cycle now!)
2020-04-27 12:17:45 +01:00
Edwin Brady
ed5b53d97f Rabbit hole
Sorry for the less than informative title :). Lots going on here. It
started as an attempt to fix unification to deal with laziness coercions
in trickier places, but unearthed a couple of tricky and interconnected
issues that are hard to unpick into a single patch. So, this fixes a few
things:

- default hints should only be resolved on the current elaboration (e.g.
nested function definitions, not the outer definition which might not
yet be complete)
- delayed elaborators should be allowed to have nested delayed
elaborators, which means disambiguation is a little bit better
- we should delay elaborating arguments where the type isn't known yet,
because later arguments may resolve the type, and we can use this to
help with disambiguation/laziness coercions
- other bits and pieces arising
2020-03-27 00:11:21 +00:00
Edwin Brady
e69c1529d9 Bitwise operators 2020-01-31 16:25:19 +00:00
Edwin Brady
2bb496f74b Chapter 11 examples now working 2019-07-08 23:46:20 +02:00
Edwin Brady
f37da6c5b7 Start adding tests for TypeDD book
Also detailing any changes needed to the code. Added primitives for
Doubles, and repl/replWith to get Chapter 2 code to work.
2019-06-30 15:50:58 +01:00
Edwin Brady
99dac56e1e Make sure matches are not too specific
i.e. if an argument has a polymorphic type, we shouldn't allow a
concrete type in its place
2019-06-29 19:28:04 +01:00
Edwin Brady
0a15c2cda1 Pay attention to visibility of names
Name lookup and search should ignore names which aren't visible (that
is, private names in another namespace)
2019-06-24 00:57:22 +01:00
Edwin Brady
772b098de0 The Prelude type checks! 2019-06-13 13:23:21 +01:00
Edwin Brady
5a3aa3b13c Some fixes for as patterns, add them implicitly
Much of the effort in renaming is to make types of holes display more
nicely!
2019-06-09 23:12:11 +01:00
Edwin Brady
146c301f6c Change main program to be Idris2
With the --yaffle flag, you get the old behaviour which is to invoke the
checker for the core theory (and all the tests are updated appropriately
for this).
2019-06-09 11:58:29 +01:00
Edwin Brady
14f717aa33 Add test for failed delayed elaborator 2019-05-12 16:03:04 +01:00