Commit Graph

320 Commits

Author SHA1 Message Date
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
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
Arnaud Bailly
18d83420da
initial import of idris 1 network lib 2019-07-22 17:24:55 +02: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
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
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
Edwin Brady
677ddea9c5 Only check determining arguments at the top level
They're just about deciding whether it's okay to start an auto implicit
search, not whether it's okay to continue search, which is part of the
problem in #25.
2019-07-18 20:32:03 +01:00
Edwin Brady
f35124e76a Add note to CONTRIBUTING.md
%default directives not yet implemented
2019-07-18 20:32:03 +01:00
Edwin Brady
623024d179
Merge pull request #28 from jfdm/add-either
Inclusion of Either within Base.
2019-07-18 20:31:51 +01:00
Edwin Brady
c52bd22523
Merge pull request #27 from shmish111/master
Add Data.Morphisms to base
2019-07-18 20:29:48 +01:00
Edwin Brady
aa446d5d39
Merge pull request #31 from diakopter/patch-1
add talk video link
2019-07-18 20:27:14 +01:00
Edwin Brady
b601abee9d
Merge pull request #22 from PeterHajdu/openbsd
Use fgetc instead of getc
2019-07-18 20:23:44 +01:00
Matthew Wilson
7fd70d5860
add talk video link 2019-07-18 15:06:42 -04:00
Edwin Brady
1dea5c2dc3 Update issue templates 2019-07-18 19:03:34 +01:00
Jan de Muijnck-Hughes
5823d6b294 Inclusion of Either within Base.
Straightforward port of Either from Idris to Idris2.
2019-07-18 16:32:19 +01:00
David Smith
96ec5f6b3a Add Data.Morphisms to base 2019-07-18 14:46:59 +01:00
Edwin Brady
b1081e6e04 Add missing export modifiers in Data.Vect
Lots were missing, and some were export, which should probably be public
export because the nature of Vect is that it could commonly be used in
types.

Fixes #13
2019-07-18 11:25:41 +01:00
Edwin Brady
d00a482667 Fix C calls from Chez
This hasn't been tested much (and indeed isn't in the test suite because
I haven't found the way to load shared objects nicely portably yet!) so
I hadn't noticed, but primitive types are translated to names before
compilation to support matching on types, so we need to account for
this.

Also, CG directives need to be processed after loading from ttc
2019-07-18 11:25:41 +01:00
Edwin Brady
d61e60c9e0 Update issue templates 2019-07-17 19:10:04 +01:00
Peter Hajdu
1265856698 Use fgetc instead of getc
On openbsd getc is a macro that expects its parameter to be FILE*
whereas the generated code provides void*.
2019-07-17 19:10:07 +02:00
Edwin Brady
aa3f4eb0be
Merge pull request #15 from ska80/fix-install-exec
Fix makefile's 'install-exec' target
2019-07-17 10:49:49 +01:00
Edwin Brady
ec4d498b2a
Add note about needing Idris master to README
A few people have reported issues that this won't build with Idris 1.3.1, which it won't. There's a note in INSTALL.md, but it's clearly not prominent enough! I will do a new release soon, but it does take time to do it properly!
2019-07-17 10:46:28 +01:00
Kamil Shakirov
85a1f9becc Fix makefile's 'install-exec' target 2019-07-15 12:42:54 +06:00
Edwin Brady
0d5dc8cc26 Check delay is allowed before delaying
We can't nest delayed elaborators (this is an efficiency constraint, to
prevent excessive searching for ambiguous names) to run elaborator
immediately if delays aren't allowed in delayElab
2019-07-14 11:23:58 +01:00
Edwin Brady
a9895771ab
Merge pull request #9 from diakopter/patch-1
install target depend on all target
2019-07-13 10:17:56 +01:00
Matthew Wilson
8167197a4b
idk 2019-07-12 07:06:25 -04:00
Matthew Wilson
b7a11bd22c
enable install-libs workflow and the typical install behavior 2019-07-12 07:04:36 -04:00
Edwin Brady
9f94606037 Finish Chapter 12 tests 2019-07-12 09:34:29 +02:00
Edwin Brady
39ee4ad9c8 Numeric range syntax 2019-07-12 09:32:36 +02:00
Edwin Brady
865f4380ca Merge branch 'master' of github.com:edwinb/Idris2 2019-07-12 09:03:30 +02:00
Edwin Brady
d969a6f356
Merge pull request #10 from diakopter/patch-2
typo? in TypeDD
2019-07-12 09:03:26 +02:00
Matthew Wilson
77c0d7c3e5
typo? in TypeDD 2019-07-11 23:14:08 -04:00
Matthew Wilson
8f4c35a7b5
install target depend on all target 2019-07-11 22:44:21 -04:00
Edwin Brady
4860d2b751 Add Range interface to prelude
This is part of what we used to have in Enum but I think it's better to
separate the two. Added implementations for Nat, and anything in
Integral/Ord/Neg, so that we get range syntax (at least when its
implemeted) for the most useful cases.
2019-07-11 23:38:25 +02:00