Fixes#92, because it wasn't re-evaluating the type and establishing
that the thing it was looking for must be a Fin for fromInteger so
resorting to the default integer literal instead.
Sometimes we swap the arguments, to reduce code duplication, but we need
to remember we've done that since (1 x : a) -> b is valid for an
argument of type (x : a) -> b, but not vice versa (that is, we have a
teensy bit of subtying to deal with, for convenience...).
This fix seems a bit ugly, but we do at least now propagate the
information. Fixes#82.
This ignores empty lines in the REPL and doesn't show a parse error on
CTRL+D/EOF anymore.
Add NOP variant to REPLCmd to represent an empty command.
Split command in eoi or nonEmptyCommand. nonEmptyCommand is still
guaranteed to consume input. command may be eoi in which case it does
not consume input.
Print a newline after receiving EOF on the console. Since this is only
relevant in the REPL (quiet or not) this uses putStrLn rather than
iputStrLn.
I don't know why I originally made it 'Inf' only in the evaluator... but
we certainly want 'Lazy' delays to block too, especially if they're
guarding non-terminating computations.
This is supported by Idris 1 and is handy for breaking cycles in
modules. To achieve this, we just need to make sure that complete
definitions aren't overwritten with empty definitions on loading.
This is an initial copy and refinement of the existing documentation for packaging.
This commit also starts the Idris2 reference documentation, in which we can start documenting the language proper. Maybe we should include the contents of `Notes` here, but that is a question for later.
Checking the let expression in full can break sharing when unifying the
types, and it's unnecessary because we've already checked the type of
the scope unifies with the expected type.
Fixes#63
for some reason running idris2 _without_ an input file fails which
throws this test in a spin. We start the interpreter in ide mode on a
socket loading an empty module without prelude and then request
loading a file that does not require Prelude.