Added Prelude.Interactive, for the I/O things, including some
convenience functions for starting simple looping interactive programs,
which involved adding Prelude.File too, and moving getArgs to the
Prelude.
Removed a no longer relevant test.
Reduction to weak head normal form. Currently includes structure of the
algorithm, but does not yet reduce function names.
Also removed ':hnf' from REPL commands and replaced with ':whnf'.
Mostly by delaying the expensive checking for uniqueness of names until
the point where we actually need the branch, thus removing a significant
amount of unnecesary work.
I assume this should also build with previous versions of stackage,
given these constraints.
Also, xml was only used by the Java backend to make pom.xml files.
Two logging effects with appropriate tests and documentation have been added.
These effects provide:
1. A Simple logger that provides logging in effectful functions based
on numerical levels of verbosity.
2. A more advanced logger that adds categorisation of logging statments in
addition to levels.
Previously, FCs coming from syntax rules would keep the FCs of their
definition context. Now, after expanding a syntax rule, the FCs that
aren't contained in the region in which the syntax was expanded are
replaced by a reference to the present file.
This does not give a precise source location - that runs the risk of
generating false highlighting information - but this solution at least
places the error in the right file, and the "While elaborating ..." bit
can be used to find the error. We should probably get better at
separating the highlighting-relevant FCs from the
highlighting-irrelevant FCs in the future.
Clearly there are use cases requiring a lower optimization setting, so let the user decide via config or flag like before. Rather than hard-coding either hig or low optimization.
-O2 causes massive memory consumption while compiling Idris. In particular, GHC 7.8.4 needs more than four gigabytes of RAM to compile Elab.Term with -O2, which rules out Idris installation for many machines and causes Travis builds to terminate.
Type class methods references were previously elaborated using the
ordinary function call elaboration, but their class isn't yet available
when the method lookup function is elaborated. This leads to a "can't
resolve type class" error on the type class definition.
Now, they have an explicit dictionary argument inserted, pointing at the
dictionary that's used for the type of the method whose signature they
appear in.
Fixes#2302.
Instead of checking there's exactly one result, they must check that one
of the (possibly many) results is the exact name they were looking for,
since some things may be unqualified and will be returned anyway.
Fixes#2271 (again; test for disambig001 and disambig002 added)
This used to be needed because the elaborator wasn't good at going back
and patching up things that didn't work right, but now it just gets in
the way and causes all sorts of other problems. This tidies up
elaboration/unification a bit more.
This allows us to traverse the parse tree with generic functions.
And we leave a record of just what directives was in the file.
And it is now possible to serialize them.