Commit Graph

307 Commits

Author SHA1 Message Date
Edwin Brady
eaff52a6e1 Use updated NF for delayed elaborators
Since the NF might refer to hole names, and those hole names might be
possible to evaluate now, we'll need to recalculate the expected type's
normal form before rerunning the delayed elaborator
2019-05-11 22:23:50 +01:00
Edwin Brady
43d323f685 First go at ambiguous name resolution
Works by running all possible elaborators and checking that exactly one
succeeds. Still to do: pruning the list of elaborators by target type,
dealing with 'UniqueDefault', checking that delaying on failure works as
it should.
2019-05-11 20:50:51 +01:00
Edwin Brady
46213a903c Store resolved ids in pattern names
It's only for keeping them unique, so this is both more efficient, and
means we can safely write them out using their resolved ids in the name
map
2019-05-11 13:00:12 +01:00
Edwin Brady
a2ce8d0b7d Add as patterns
When we encounter them, not that they're a binding as normal, but also
record the thing they expand to. Then bind as a PLet, and convert that
to a Let on the RHS so it has computational force. The case tree
compiler knows about as patterns, so they get compiled to use the
appropriate name on the rhs (rather than a let).
2019-05-09 16:48:09 +01:00
Edwin Brady
664008d046 Add operations on primitives 2019-05-08 10:21:00 +01:00
Edwin Brady
411b8ccc07 Support eta in unification
Also added (necessarily) a rule for lambdas
2019-05-07 15:06:00 +01:00
Edwin Brady
77bf4c7c44 Added test framework (copied from Blodwen) 2019-05-07 10:43:02 +01:00