Commit Graph

745 Commits

Author SHA1 Message Date
Edwin Brady
e95c5f7571 Remove unnecessary check from let elaboration
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
2019-07-31 10:10:47 +01:00
Arnaud Bailly
f06a635630
make library loading directive documentation specific to chez 2019-07-30 18:41:31 +02:00
Edwin Brady
f39b736110
Merge pull request #66 from abailly/no-prelude
check noprelude option when starting up without loading a file
2019-07-30 16:47:08 +01:00
Arnaud Bailly
ff7180e6b5
check noprelude option when starting up without loading a file #65 2019-07-30 13:56:27 +02:00
Edwin Brady
147d81f8ff Forgot to add test files! 2019-07-30 12:33:49 +01:00
Edwin Brady
47ad8ee7f5 Propagate implicits to with clauses
Fixes #57. Also move much of the 'with' machinery to its own source
file.
2019-07-30 12:32:33 +01:00
Arnaud Bailly
c49942cfc4
(hopefully) fix ide-mode-socket test
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.
2019-07-30 07:57:44 +02:00
Edwin Brady
7e1c24a559 Elaborate default methods at given multiplicity 2019-07-29 14:53:01 +01:00
Arnaud Bailly
48ad84af0f
Merge branch 'master' of https://github.com/edwinb/Idris2 2019-07-29 14:13:58 +02:00
Arnaud Bailly
d600a3980c
added back missing file extension 2019-07-29 13:15:52 +02:00
Arnaud Bailly
a646575f00
document %cg code generation directive for DLL loading 2019-07-29 12:47:05 +02:00
Arnaud Bailly
ec402c3c4a
reference idris_net library as idris_net.so for all OSes 2019-07-29 12:46:23 +02:00
Arnaud Bailly
fbfa74d48d
Revert "load library using OS-dependent names"
This reverts commit 9e7d79cb65.
2019-07-28 23:00:29 +02:00
Arnaud Bailly
4d3e190e90
Merge branch 'master' of https://github.com/edwinb/Idris2 into network-lib 2019-07-28 23:00:07 +02:00
Arnaud Bailly
9e7d79cb65
load library using OS-dependent names 2019-07-28 22:53:08 +02:00
Arnaud Bailly
75459e7fca
fix execution of network test to correctly load library 2019-07-28 22:53:05 +02:00
Edwin Brady
e6cf936331 Make sure hole names are unique
Fixes #6
2019-07-28 21:04:55 +01:00
Edwin Brady
e7054500e4
Merge pull request #60 from chrrasmussen/run-individual-tests
Run individual tests (Fixes #23)
2019-07-28 20:17:28 +01:00
Christian Rasmussen
e82a0c6acb Add instructions on how to run a subset of the tests 2019-07-28 20:21:34 +02:00
Edwin Brady
aaaf3a873b Check implicit searches are complete
Fixes #55
2019-07-28 18:27:43 +01:00
Christian Rasmussen
54f00e9247 Run individual tests (Fixes #23) 2019-07-28 18:54:23 +02:00
Edwin Brady
56a09b033f
Merge pull request #59 from clayrat/empty-modules
Allow empty modules
2019-07-28 15:25:46 +01:00
Edwin Brady
db18f08e49
Merge pull request #54 from ether42/unrecognised
Make it a little easier to debug IDE mode
2019-07-28 15:25:20 +01:00
Edwin Brady
b3c53a3b54
Merge pull request #53 from ether42/master
Only display IDE port when listening
2019-07-28 15:23:44 +01:00
Edwin Brady
f1a4e0c09d Change elaboration of lets
Elaborate the scope of a let without the computational behaviour,
meaning that `let x = v in e` is equivalent to `(\x => e) v`. This makes
things more consistent (in that let bindings already don't propagate
inside case or with blocks) at the cost of not being able to rely on the
computational behaviour in types. More importantly, it removes a
significant potential source of slowness.

Fixes #58

If you need the computational behaviour, you can use a local function
definition instead.
2019-07-28 13:43:01 +01:00
Edwin Brady
d5409ac2d0 Add 'libs' directory to paths
This is for finding support libraries for code generators, e.g. the
shared objects that chez will load for glue code for foreign libraries.
It'll be used more shortly...
2019-07-28 11:48:00 +01:00
Alex Gryzlov
fb832cb49c allow empty modules 2019-07-28 12:43:25 +03:00
Arnaud Bailly
f6b746e7ac
set LD_LIBRARY_PATH for network tests to run 2019-07-28 09:53:33 +02:00
Edwin Brady
0bb9a13d37 Update method names when checking default methods
Fixes #42. If we don't do this, the name is treated in the saem way as
an unbound implicit, which is not what we want, so update with the
method applied to the parameters.
2019-07-27 17:01:02 +01:00
Arnaud Bailly
02978c81fc
Merge branch 'master' of https://github.com/edwinb/Idris2 into network-lib 2019-07-27 17:27:49 +02:00
Arnaud Bailly
775c67452a
reactivate all tests 2019-07-27 17:18:06 +02:00
Arnaud Bailly
5a555641a0
Merge branch 'master' of https://github.com/edwinb/Idris2 2019-07-27 17:03:26 +02:00
Kevin Boulain
86b1e43274 Make it a little easier to debug IDE mode 2019-07-27 15:58:22 +02:00
Edwin Brady
19a079511d
Merge pull request #51 from clayrat/record-fix
fix implicit/brace block ambiguity in records
2019-07-27 13:58:13 +01:00
Kevin Boulain
45329df3a5 Only display IDE port when listening 2019-07-27 14:47:37 +02:00
Edwin Brady
81fefed3f3 No need to decorate implicit record fields 2019-07-27 13:19:49 +01:00
Edwin Brady
cd20ebe1af Merge branch 'abailly-check_version' 2019-07-27 12:40:19 +01:00
Edwin Brady
1a4be09f23 Merge branch 'check_version' of https://github.com/abailly/Idris2 into abailly-check_version 2019-07-27 12:31:23 +01:00
Edwin Brady
9a38d4a36d Merge branch 'clayrat-data-list' 2019-07-27 12:10:08 +01:00
Edwin Brady
0e8f10d151 Merge branch 'data-list' of https://github.com/clayrat/Idris2 into clayrat-data-list 2019-07-27 12:09:20 +01:00
Edwin Brady
5f385527c6 Remove unnecessary source file 2019-07-27 12:05:32 +01:00
Alex Gryzlov
20c57eafc1 fix implicit/brace block ambiguity in records 2019-07-27 02:16:35 +03:00
Edwin Brady
f6fa192779 Add test for fix for #49 2019-07-26 23:13:11 +01:00
Edwin Brady
f86ba8cc9b Use any local at multiplicity 0
When searching for an auto implicit, if we're at multiplicity 0 we can
use any local (e.g. when searching in a type).

Fixes #49
2019-07-26 23:10:41 +01:00
Arnaud Bailly
eb760fe20c
fix correct version to 1.3.2 2019-07-26 20:10:22 +02:00
Edwin Brady
fa76f2a78b Bind auto implicit arg names in LHS
We were only doing implicits, so add auto implicits too. It's slightly
tricky, because we might also have implicits given of the form @{x}
which stands for the next auto implicit.

Fixes #50
2019-07-26 16:58:02 +01:00
Arnaud Bailly
cb6ce92cbb
use regexp to validate idris version 2019-07-26 16:44:27 +02:00
Edwin Brady
8e9655dd9b Unbound implicits are invertible in terms
Just like all other pi-bound things, if m is an unbound implicit and we
have m ?x = m y as a unification problem, we can conclude ?x = y because
it has to be true for all ms.

This was implemented in Blodwen but I hadn't got around to it yet for
Idris2... fortunately it's a bit easier in Idris2!

Fixes #44
2019-07-26 12:27:54 +01:00
Arnaud Bailly
6c1c865587
check idris version before building 2019-07-26 09:52:45 +02:00
Arnaud Bailly
a87639d53a
refactor code to be more compact
uses alternative branches for failed pattern matches in do-notation
2019-07-26 09:51:49 +02:00