Commit Graph

599 Commits

Author SHA1 Message Date
Edwin Brady
abd801c45a
Merge pull request #177 from SPY/testfix/chez010-macos
Fix chez010 test on MacOS
2020-01-11 22:50:16 +00:00
Edwin Brady
da293d1ce8 Check constructors are fully applied in case trees
This is necessary to build case trees correctly, and without this, we
can get mysterious and hard to debug run time errors!
2020-01-11 17:27:27 +00:00
Ilya Rezvov
32b1c9b34f use an explicit extension for libcb references in %foreign pragmas 2020-01-09 11:55:33 -08:00
Ilya Rezvov
56d24e34d4 Merge remote-tracking branch 'origin/master' into testfix/chez010-macos 2020-01-09 11:44:51 -08:00
Edwin Brady
7cde0a7255
Merge pull request #174 from chrrasmussen/fix-double-subtraction
Fix subtraction of Double in interpreter
2020-01-09 11:41:40 +00:00
Edwin Brady
4b79b98db4
Merge pull request #173 from timmyjose/fix-mit-scheme-build-issues
Reorder Scheme compilers order to pick generic Scheme last.
2020-01-09 11:39:39 +00:00
Ilya Rezvov
b437323fd2 dylib extension added for libcb to fix chez010 test on MacOS 2020-01-01 14:23:02 -08:00
Edwin Brady
bf5b2298e0 Update test chez010
To use expressions to calculate FFI convention, so that it's tested.
2019-12-30 21:16:07 +00:00
Edwin Brady
9fe236d5b1 Allow expressions in %foreign directives
Rather than just raw Strings. They get evaluated immediately at the
point of elaboration, and this can be used to save repetition (e.g. of
shared library names) in declarations.
2019-12-30 21:10:41 +00:00
Edwin Brady
55bfceff07 Copy shared libraries to executable directory
(In the Racket/Chez back ends)
A bit ugly, but it means that after making an executable, all the
necessary files are in the same directory ready for packaging. The
executable can still only be run when the libraries are in the
racket/chez library search path. In practice at the moment that means
they need to be in the current working directory...
2019-12-30 17:34:52 +00:00
Edwin Brady
20aa7f7730 Executables now go in build/exec by default
Having a separate directory for generating executables will help deal
with packaging executables for back ends which need extra library
support, since we can copy the relevant libraries into the executable
directory and know where everything is.
2019-12-30 17:03:15 +00:00
Edwin Brady
f2a26ecfbd Deal with interface constraints in method types
To build the top level method and interface record correctly, we need to
know where to put the implicit arguments, so invent names if they don't
have them already then we'll know where to put things accurately.
2019-12-29 20:36:08 +00:00
Edwin Brady
6ab4657573 Do delayed elaborators in order they were added
Earlier solutions may influence later ones. Probably we should be
cleverer still here, and keep trying while any delayed elaborators are
run successfully, because really the order shouldn't matter!
2019-12-29 15:42:33 +00:00
Edwin Brady
df3f8b73f8 Further tweak to linearity rules
When we check a scope in RigW, need to mark all linear things outside
that scope as irrelevant within the scope (since the scope may be used
multiple times).
2019-12-29 15:21:08 +00:00
Edwin Brady
6d0c4d9ea8 Slight tweak to linearity checking rules
Need to reset mutiplicity to 1 when checking a new scope.
2019-12-27 17:13:39 +00:00
Christian Rasmussen
a70c68da91 Add test for Double subtraction 2019-12-22 21:50:18 +01:00
Christian Rasmussen
479872290d Fix Double subtraction in interpreter
Fixes #171
2019-12-22 20:48:00 +01:00
Timmy Jose
1c1e2b16ca Reorder Scheme compilers order to pick Chez Scheme first.
This fixes the issue where some Scheme compiler like mit-scheme is
installed and that gets picked up first, leading to an infinite
loop in the tests.

Also see attached image in the PR.
2019-12-21 18:42:09 +05:30
Edwin Brady
e0eecc8c12 Small tweak to auto search rules
After resolving default hints, go back to normal hints because resolving
the top level default might have opened up further search possibilities.
2019-12-14 23:29:28 +00:00
Edwin Brady
f95214ff8c Need to save types on lambdas in TTC
Turns out we need this after all, since the types may be necessary
during linearity checking if imported names are imported and reduced
during elaboration for some reason (e.g. during unification)
2019-12-13 17:02:46 +00:00
Edwin Brady
952abe7fc8 Deal with auto implicits when adding lambdas
We were only checking the type for implicit lambdas, so using lambdas in
functions with an auto implicit was giving a strange error.
2019-12-09 18:00:36 +00:00
Edwin Brady
c85ffd2c29 Return correct type on variadic application
In the case where the function type is not yet known, and there's a
postponed unification problem, we were returning the function type not
the result type.
--debug-elab-check ought to be extended to catch this sort of thing.
Fixes #168
2019-12-08 00:25:49 +00:00
Edwin Brady
9ee40b94a9 Add missing conversion check
Fixes #166
2019-12-07 21:04:41 +00:00
Edwin Brady
663e1b8f69 Add uniqueSearch data type option
This changes the behaviour of 'auto' implicits so that by default they
return the first result, rather than checking for unique results. This
is consistent with Idris 1. However, we still want to check for
uniqueness somtimes (for example, with interface search, which should
reject overlapping results) so the 'uniqueSearch' option means that any
auto implicit search for the type should check uniqueness of results.

Fixes #169
2019-12-07 18:54:02 +00:00
Edwin Brady
ebb1ec3a3a
Merge pull request #167 from ska80/unwords+unlines/idris1
Add unwords and unlines to base/Data.Strings from Idris 1
2019-12-07 15:28:14 +00:00
Edwin Brady
5d4cf051d9
Merge pull request #165 from ska80/remove-swp
Remove Vim swap files
2019-12-07 15:27:27 +00:00
Edwin Brady
0c4301d1c2
Merge pull request #159 from ska80/integral-nat
Add an implementation of Integral for Nat
2019-12-07 15:26:50 +00:00
Edwin Brady
cbf2f4ac9f
Merge pull request #155 from bwignall/typo
Fix small double-and typo
2019-12-07 15:18:06 +00:00
Edwin Brady
f6397ad0f6
Merge branch 'master' into typo 2019-12-07 15:17:51 +00:00
Edwin Brady
ba5a798549
Merge pull request #153 from abailly/export-network
export Network.Socket functions
2019-12-07 15:14:42 +00:00
Edwin Brady
6c165cab52 Change default precedence of op
For consistency with Idris 1, they should be lowest precedence (other
than $) rather than highest.

Fixes #112
2019-12-06 11:21:05 +00:00
Edwin Brady
050fcfa45a
Merge pull request #148 from msmorgan/list-replicate
Add replicate to base/Data.List.
2019-12-06 10:59:12 +00:00
Edwin Brady
468555bb2e
Merge pull request #143 from ohad/bugfix-#133
Bugfix #133 and library support for tail-recursive list manipulation
2019-12-06 10:56:03 +00:00
Edwin Brady
262177016c
Merge pull request #147 from msmorgan/list-zip
Add zip functions to base/Data.List.
2019-12-06 10:42:11 +00:00
Edwin Brady
79320c1574
Merge pull request #145 from lodi/nixprep
allow overriding racket/chicken paths through environment variables
2019-12-06 10:40:32 +00:00
Edwin Brady
078b5be85f
Merge pull request #144 from sysvinit/debug-trace
Port Debug.Trace from Idris 1
2019-12-06 10:38:28 +00:00
Edwin Brady
d9f1b01ef7
Merge branch 'master' into bugfix-#133 2019-12-06 10:28:07 +00:00
Edwin Brady
0a51a72806 Add runElab to syntax tree
Nothing done yet in the elaborator, but it's ready to be filled in later
2019-12-05 18:58:53 +00:00
Edwin Brady
d5cde3f4f9 Add unquoting/escaping 2019-11-30 19:42:39 +00:00
Edwin Brady
07509f6103 Begin elaboration of quoting terms 2019-11-30 15:26:17 +00:00
Edwin Brady
aae3d0f718 Reorganise Language.Reflection modules 2019-11-30 13:23:03 +00:00
Kamil Shakirov
8afad8ef0a Add unwords and unlines to base/Data.Strings from Idris 1 2019-11-26 01:17:18 +06:00
Edwin Brady
1c006b647a Reflect/reify for TTImp
This is further progress towards a metaprogramming system in a form
similar to Elaborator Reflection or Template Haskell, but trying to
avoid leaking too many implementation details of the elaborator itself.
2019-11-24 21:17:16 +00:00
Edwin Brady
f0da43156a Use latest bound name in building case function
We were using the least recently bound, leading to the wrong type being
shown in some cases with shadowing
2019-11-23 14:44:31 +00:00
Kamil Shakirov
3dade792bc Remove Vim swap files 2019-11-20 10:12:53 +06:00
Edwin Brady
2e9eabff71 Merge branch 'master' of github.com:edwinb/Idris2 2019-11-19 14:07:55 +00:00
Edwin Brady
17c83d6f4a
Merge pull request #137 from msmorgan/remove-trailing-whitespace
Remove trailing whitespace from Idris sources.
2019-11-18 20:44:46 +01:00
Kamil Shakirov
15f6e863c4 Add implementation of Integral for Nat 2019-11-15 17:46:26 +06:00
Edwin Brady
a3dc1ff228 Add ITransform to TTImp
This is for rewrite rules/transformations which arise from partial
evaluation. Details not yet implemented.
2019-11-13 17:57:39 +01:00
Brian Wignall
fc9f2a995d Fix small double-and typo 2019-11-11 16:38:53 -05:00