Commit Graph

921 Commits

Author SHA1 Message Date
Edwin Brady
cc03a4cb3b Add missing test file
Apparently I forgot the input for linear012. Oops!
2020-06-28 22:28:56 +01:00
Edwin Brady
ff7d3a0246 Use precise inference for hole types
That is, don't generalise multiplicities, because we need the hole type
to be precise wrt multiplicities. Resolves #189
2020-06-28 22:16:15 +01:00
Christian Rasmussen
24bb84fcf5 Avoid traversing all Idris modules twice when installing 2020-06-28 21:36:48 +02:00
Christian Rasmussen
3bf384860a Add documentation for sourcedir/builddir/outputdir 2020-06-28 19:56:02 +02:00
Edwin Brady
e175bb8310
Merge pull request #379 from edwinb/interface-type
Record implicit parameters of interfaces
2020-06-28 15:31:47 +01:00
Edwin Brady
8ddac9c1d5 Record implicit parameters of interfaces
We need to make sure they are inferred again when elaborating methods,
so substitute in a _ in method types before substituting in the explicit
parameters.

In future, it might (probably will) also be useful to allow giving the
implicit parameters explicitly when defining implementations.

Fixes #374
2020-06-28 14:58:57 +01:00
Niklas Larsson
cd777a00ce
Merge pull request #376 from andrevidela/kleisli-arrow
Add Kleisli arrow operators to contrib
2020-06-28 00:18:04 +02:00
André Videla
8d04881356 Add Kleisli arrow operators to contrib 2020-06-27 22:02:05 +01:00
Edwin Brady
fb9f79e3c6
Merge pull request #375 from edwinb/interactive
Add new clause at next blank line
2020-06-27 21:36:59 +01:00
Edwin Brady
17fec60d7a Add new clause at next blank line
This fixes a thing that's been annoying me in the vim mode. It's usually
something that's left to the editor, but we do all the work for the vim
mode! (This is hard to test conveniently, sorry...)
2020-06-27 21:09:03 +01:00
Edwin Brady
35e328a505
Merge pull request #373 from edwinb/interactive
Various interactive editing improvements
2020-06-27 19:10:16 +01:00
Edwin Brady
929c5504c5 Implement make-case 2020-06-27 18:28:09 +01:00
Edwin Brady
c043fc3c57 Do make-with IDE command properly
Now updates the file rather than just printing the output, in update
mode. Also adds bird tracks where appropriate in literate mode.
2020-06-27 17:06:17 +01:00
Edwin Brady
1b695bcc52 Display binder if it's not implicitly bindable
This is particularly important if we're generating something that needs
to be parsed and checked again. Fixes #185
2020-06-27 16:26:34 +01:00
Ohad Kammar
f31318f5e6
Merge pull request #372 from ohad/export-length-correct
Export the `lengthCorrect` proof, as users might want to use it
2020-06-27 16:21:04 +01:00
Ohad Kammar
6683a2147f Export the lengthCorrect proof, as users might want to use it
Change the `len` to be irrelevant, as it's uniquely determined by
matching on the input vector
2020-06-27 15:54:35 +01:00
Edwin Brady
6c007fc046 Use full names for constructors in case split
Fixes #184
2020-06-27 15:47:38 +01:00
Ohad Kammar
574524d8de
Merge pull request #368 from ohad/fstrings
Add a simple DYI f-string / string interpolation library
2020-06-26 21:12:13 +01:00
Rui Barreiro
08823658cd node tests pass 2020-06-26 20:42:40 +01:00
Giuseppe Lomurno
28018d9573 Fixed typo 2020-06-26 21:26:36 +02:00
Giuseppe Lomurno
36c62c754a Updated documentation 2020-06-26 19:16:14 +02:00
Giuseppe Lomurno
5ccc6a397d Added Control.ANSI module in contrib 2020-06-26 19:10:02 +02:00
Johann Rudloff
7128f127e8 Make Prelude.unpack tail-recursive 2020-06-26 18:41:52 +02:00
Ohad Kammar
ac1fa28890 Add a simple DYI f-string / string interpolation library
Apparently the concrete syntax is controversial ("{apples}"
vs. "$oranges"), so I'm just adding a simple DYI version until we
agree on a concrete syntax
2020-06-26 16:52:37 +01:00
Edwin Brady
176f2516da
Merge pull request #365 from edwinb/lineario
Add linear network library
2020-06-25 12:58:26 +01:00
Edwin Brady
33957c4328 contrib needs to be built before network now 2020-06-25 12:12:20 +01:00
Edwin Brady
531170e949 Add linear network API
This involves updating the bootstrap code since it needs a fix in
interface resolution. It shouldn't affect the Idris2-boot build though,
since it's in the libraries not the Idris2 source.
2020-06-25 12:07:33 +01:00
Edwin Brady
9576fdc1d3 LIO.run needs exporting
It's useless without it!
2020-06-25 11:57:17 +01:00
Niklas Larsson
534fc0e073
Merge pull request #353 from stepancheg/modns
Better TTC data is in an older format message
2020-06-25 10:47:46 +02:00
Niklas Larsson
8d75d70fac
Merge pull request #342 from csabahruska/master
add unit test for constructor duplicate
2020-06-25 10:39:25 +02:00
Edwin Brady
0f71464ab5
Merge pull request #363 from edwinb/lineario
More on the Linear IO experiment
2020-06-25 00:10:09 +01:00
Edwin Brady
908742c2a8 Update tests
Seemed I hadn't cleaned thoroughly enough...
2020-06-24 23:53:42 +01:00
Edwin Brady
ebc413ede5 Postpone elaborating lambdas
It's worth delaying in case doing some more work (and some more
interface resolution) can make the type more concrete. This makes
test linear011 work more smoothly, and will help with this sort of
program in general.

A better way, later, would be to try elaborating and delay only if the
type is not yet known. We have the facilities, but it's too fiddly for
me to want to implement it right now...
2020-06-24 23:27:45 +01:00
Edwin Brady
854804dbfb Determining argument check below top level
We need to check below top level too, since there could be holes that
we're happy to resolve by searching. The linearity test added
illustrates a place where this is needed.
2020-06-24 22:07:52 +01:00
Edwin Brady
ff619951f0 Reorganise LIO to allow 'pure'
Doing this is awkward, for a number of reasons, including 'pure' not
being linear in its argument - there's no guarantee it'll be used
linearly after all - and lack of multiplicity polymorphism. Fortunately
the user doesn't have to know about the ugliness underneath!

We can look at ways to make it less horrible later :). For now, this is
starting to look like something that allows us to write linear protocols
without too much extra machinery on top of IO.
2020-06-24 21:24:15 +01:00
Edwin Brady
d8abf3b74e
Merge pull request #337 from MarcelineVQ/unelab-name
change how unelabBinder shows names
2020-06-24 17:52:57 +01:00
Edwin Brady
354830f41d
Merge pull request #359 from edwinb/lineario
Add Control.Linear.LIO
2020-06-24 00:16:44 +01:00
Edwin Brady
9ea4108c82 Also need contrib for the tests 2020-06-23 23:29:28 +01:00
Edwin Brady
8540d2fb9a Add experimental library for linear computations
In Control.Linear.LIO - allows wrapping anything that supports chaining
of linear computations (most usefully, IO).
2020-06-23 23:11:48 +01:00
Edwin Brady
f120f483a9 Default hints can use locals below top level
It's okay to use locals once we've applied the default hint itself -
it's just committing to locals too early we want to avoid. This allows
%defaulthint to be more expressive (under the assumption we want it to
be :). But shortly we will need it...)
2020-06-23 22:56:55 +01:00
Edwin Brady
a7d5a9a7fd
Merge pull request #358 from edwinb/concurrency-fix
Small concurrency fixes
2020-06-23 19:30:56 +01:00
Edwin Brady
5ed27947cb Small concurrency fixes
Conditional variables with timeout in Chez didn't work, so changed to a
consistent meaning of the timeout (microseconds). Also fix linearity of
unsafePerformIO.
2020-06-23 19:06:30 +01:00
Alex Humphreys
565ede2406 Update linear.rst
Fix typo
2020-06-22 21:23:45 +01:00
Rui Barreiro
7c7f7efe04 test node019 runs 2020-06-22 20:57:25 +01:00
Stiopa Koltsov
c140605a0f Extract Prelude.Basics, Prelude.Uninhabited from Prelude 2020-06-22 18:10:06 +01:00
Dario Vladovic
9cc1215f6c Format Homebrew install code block 2020-06-22 17:17:11 +01:00
Edwin Brady
1e6314c4cc
Merge pull request #345 from edwinb/hasio
HasIO interface for IO actions
2020-06-21 20:24:29 +01:00
TomasPuverle
833a24cb45
Updated documentation for export (#344)
Co-authored-by: Thomas Herzog <thomas-github@poto.cafe>
2020-06-21 20:17:34 +01:00
MarcelineVQ
d94b86e62c change namespace parser to have minimum indentation
The namespace parser was not requiring a minimum indentation and instead
based its indentation on the following line, which meant that a line like:

namespace Foo
foodef : Int

placed foodef into namespace Foo instead of the module's top level.
And so made it unclear when a namespace ends.
2020-06-21 20:17:00 +01:00
Edwin Brady
413e75b6a3 Fix documentaton error 2020-06-21 19:56:23 +01:00