Commit Graph

651 Commits

Author SHA1 Message Date
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
Edwin Brady
4f4d4ccbe9 Store invertibility in definition, not hole
This will be useful shortly, and in general because it'll give us more
flexibility in unification to be able to spot things which are
guaranteed invertible like constructors.
2019-07-26 00:00:03 +01:00
Arnaud Bailly
514d3a8d98
Merge branch 'master' of https://github.com/edwinb/Idris2 into network-lib 2019-07-25 19:52:23 +02:00
Arnaud Bailly
87b754de45
fix execution of tests to actually fail if there's an error 2019-07-25 19:49:15 +02:00
Arnaud Bailly
055a5f2449
got a first basic test passing 2019-07-25 09:43:33 +02:00
Alex Gryzlov
c3191f7d90 export decEq implementation 2019-07-24 17:13:47 +03:00
Alex Gryzlov
d289a0da4c fix names 2019-07-24 16:23:18 +03:00
Alex Gryzlov
b9b41dea40 port Data.List 2019-07-24 16:11:27 +03:00
Edwin Brady
e9f17c0afe
Merge pull request #35 from Theodus/ci
Add CI
2019-07-24 12:31:29 +01:00
Arnaud Bailly
b5cc727f3b
[wip] test basic server 2019-07-24 10:08:59 +02:00
Arnaud Bailly
dc219a07ec
provide a way to retrieve port of (server) socket bound to 0 2019-07-24 09:17:29 +02:00
Arnaud Bailly
7c1b1bc98d
got code to compile
* removed Cgi
* add a couple of utility functions to the C source
* converted all foreign calls to use cCall
2019-07-23 22:39:54 +02:00
Theo Butler
6ab41086a7 Add Travis CI config 2019-07-23 21:49:24 +02:00
Edwin Brady
36b5081a4e
Merge pull request #16 from clayrat/clean-ipkg
Add --clean option for ipkg
2019-07-23 15:14:02 +01:00
Edwin Brady
74e383f0c4
Merge pull request #40 from ska80/fix-missing-quotes
Add missing double quotes
2019-07-23 14:52:00 +01:00
Kamil Shakirov
71e34596cb Add missing double quotes 2019-07-23 14:54:58 +06:00
Edwin Brady
048c10a64a Update issue templates
Add "installation problem", and while I'd rather not have larger proposals on the tracker, it would still be useful to list small requests where it's objectively clear what the resolution is.
2019-07-23 09:43:18 +01:00
Arnaud Bailly
2b11b7cc32
add test target and basic test 'harness'
test harness is a grand word for just a basic C main file that uses
plain <assert.h> macro to run tests
2019-07-23 09:38:28 +02:00
Arnaud Bailly
7f53d0d54d
add 'missing' functions into base libraries 2019-07-23 09:37:48 +02:00
Edwin Brady
86eb475413 Check for name clashes in impl constraints
We were only checking parameters, meaning that there were potential
clashes leading to confusing behaviour, and meaning that it was somehow
relevant what the names were in the interface!
2019-07-22 23:16:51 +01:00
Arnaud Bailly
18d83420da
initial import of idris 1 network lib 2019-07-22 17:24:55 +02:00
Arnaud Bailly
db8079bae6
Merge branch 'master' of https://github.com/edwinb/Idris2 2019-07-22 17:22:39 +02:00
Edwin Brady
7e67ba4f35 Allow marking interface methods multiplicities
Now by marking a method as multiplicity 0, we can explicitly say that
it's compile time only, so we can use it to compute types based on other
erased things - see tests/idris2/interface008 for a small example.

This fixes #8 - at least in that it allows the interface to be expressed
properly now, although the multiplicity annotations mean that
unfortunately it can't be compatible with Idris 1.
2019-07-22 16:21:33 +01:00
Edwin Brady
9813b39be6 Update INSTALL/README
These now say Idris 1.3.2 is required
2019-07-22 16:15:51 +01:00
Edwin Brady
91262b4800 Fix possible loop in auto implicit search
A local variable can't be applied to itself when searching (otherwise,
for example, we could end up trying something like id id id id id id etc
forever). So remove it from the environment before searching for its
arguments.

This and the previous patch fix #24. (Or, at least, the minimised cases
reported as part of it!)
2019-07-22 11:21:34 +01:00
Edwin Brady
0e4c610f56 Fix for interfaces with parents
Don't use the interface itself when checking parent implementations
exist, otherwise we'll end up in a cycle (because the parent
implementation will sort of exist as a result!)
2019-07-22 11:21:34 +01:00
Edwin Brady
6a0c77257e Update issue templates 2019-07-21 14:55:40 +01:00
Edwin Brady
7f742caf3b Add icons/logos 2019-07-21 14:47:11 +01:00
Edwin Brady
e0757be43c Add template for readthedocs 2019-07-21 14:45:12 +01:00
Edwin Brady
d9719f53a5
Merge pull request #38 from chrrasmussen/docs-for-exp-log
Document base for exp and log functions
2019-07-21 13:43:33 +01:00
Edwin Brady
45b6d5165c
Merge pull request #33 from simonchatts/master
Use ahead-of-time compilation with Chez
2019-07-21 13:43:04 +01:00
Edwin Brady
256b800cab
Merge pull request #37 from chrrasmussen/fix-acos
Fix primitive function for acos
2019-07-21 13:39:31 +01:00
Arnaud Bailly
dc9ab95adb
Merge branch 'master' of https://github.com/edwinb/Idris2 2019-07-21 07:48:49 +02:00
Arnaud Bailly
a6610a1a07
add very basic and fragile test for ide-mode-socket 2019-07-21 07:35:20 +02:00
Arnaud Bailly
72f579aaa9
[wip] introduce IDE-mode Client
* immediate goal is to be able to write tests against the IDE-mode
  server
* next goal would be to have a REPL talking to a server
2019-07-21 07:14:46 +02:00
Christian Rasmussen
7310776603 Document base for exp and log functions 2019-07-21 02:14:48 +02:00
Christian Rasmussen
cafae8f11d Fix primitive function for acos 2019-07-21 01:47:47 +02:00
Edwin Brady
6d90b72fe9 Check under data constructor for holes
We can't begin a search until we know what we're searching for! For some
reason I forgot to add this case, and without it the search space can
explode, or we might find an answer too soon and commit to the wrong
thing!

Fixes #36
2019-07-20 21:09:33 +01:00
Edwin Brady
0b1d6527c8 Add test for #25 2019-07-20 19:01:34 +01:00
Edwin Brady
cae9162fcf Check under 'as' patterns for case arg usage 2019-07-20 18:57:03 +01:00
Edwin Brady
6dd18d798a Allow annotating functions with multiplicity
This means we can write truly type level only functions, by annotating
them with a 0 before the type declaration.
2019-07-20 18:04:18 +01:00
Edwin Brady
607e280895 Place implicits through to method bodies
This means that even if the relevant parameters aren't used by a method
body, the method can still see what the implicits are (though they will
be 0 multiplicity).

This is relevant to #8, but doesn't really fix it because we still need
a way of saying that methods are 0 multiplicity.
2019-07-20 16:25:40 +01:00
Edwin Brady
e902340346 Change elaboration of parent constraints
We need to turn pairs into separate constraints, which is a bit of a
hack but the constraints need to be separate in order to build the
chasing functions which find the parent constraints correctly.

Possibly there is a neater way, which is to teach the search algorithm
to look in the hints for pairs, but that's a lot more complicated (and
probably unnecessarily so).

Fixes #25
2019-07-19 11:51:40 +01:00
Arnaud Bailly
4f21234c9e
basic test for --ide-mode
how to take care of input termination properly? currently we add the
message 'Alas the file is done' in the expected outcome but that's
ugly
2019-07-19 12:34:15 +02:00
Simon Chatterjee
3bee97c0b9 Use ahead-of-time compilation with Chez
This is a bit rough, but does yield an executable with a ~40% speedup in
startup latency on one test. The resulting executable is a .so file with a #!
invocation of the local chez scheme executable to run it, so the binary isn't
portable (even to a machine with the same architecture/OS) unless there's an
identical chez installation on both machines.

As with the .ss source, the .so is currently leaked in the temporary directory.
2019-07-19 10:27:15 +01:00