Commit Graph

203 Commits

Author SHA1 Message Date
Nick Drozd
48fe4382eb Simplify List 2020-07-07 10:48:23 +01:00
Nick Drozd
877f3702ad Simplify Maybe 2020-07-07 10:48:23 +01:00
Nick Drozd
465be9cb86 Simplify Either 2020-07-07 10:48:23 +01:00
Nick Drozd
faabbfcea1 Add some Uninhabited implementations 2020-07-07 10:48:23 +01:00
Nick Drozd
7c923944ae Add %default total to a few modules 2020-07-07 10:48:23 +01:00
Michael Birch
5c9339bde8
Merge sort implementation for Vect (#417) 2020-07-07 10:25:42 +01:00
Niklas Larsson
52c6db09d1 Add <?> for replacing error messages 2020-07-06 14:13:56 +02:00
Niklas Larsson
60a067fab1 Remove dumpState 2020-07-06 13:57:13 +02:00
Niklas Larsson
5060eaafaf Make things public export to work with bootstrap 2020-07-05 21:51:12 +02:00
Niklas Larsson
af83c9303b Add test and documentation 2020-07-05 21:51:12 +02:00
Niklas Larsson
d779c85df4 Add optional 2020-07-05 21:51:11 +02:00
Niklas Larsson
0e51124a43 Add option 2020-07-05 21:51:11 +02:00
Niklas Larsson
bba15974a5 Add takeWhile
add substring and length primitives to Data.Strings
2020-07-05 21:51:11 +02:00
Niklas Larsson
39535bf11a Add lifting 2020-07-05 21:51:11 +02:00
Niklas Larsson
d97789190d Add bounds checking 2020-07-05 21:51:11 +02:00
Niklas Larsson
f290c6c3ce Start on a simple string parser 2020-07-05 21:51:11 +02:00
Edwin Brady
7a0b25f994
Merge pull request #369 from cypheon/tailrec-unpack
Make Prelude.unpack tail-recursive
2020-07-05 14:11:02 +01:00
Edwin Brady
a9478875b3
Merge pull request #392 from buzden/append-properties
Injectivity and similar properties were added for lists'a append
2020-07-05 14:08:07 +01:00
Edwin Brady
5487290499
Merge pull request #282 from ether42/master
Fix MkRecord signature
2020-07-05 14:03:57 +01:00
Edwin Brady
9d1bb82c48
Merge pull request #242 from nickdrozd/algebra
Add Algebra interfaces and laws
2020-07-05 00:04:13 +01:00
Edwin Brady
45a9668370 Export all of the Prelude as Prelude
There is an argument that, for import public, this should be automatic
(that is, the publicly imported things should be reexported with the
parent namespace). I decided not to do this, because another use of
import public which we do a lot in the Idris 2 code base is purely as a
convenience, where we still expect things to be in their original
namespace.
Also, where there's a choice between things being explicit and implicit,
I prefer to err on the side of explicit now.
So, if what you really want in an API is to reexport, you can do that,
but explicitly.
2020-07-04 21:57:54 +01:00
Jan de Muijnck-Hughes
874236aac0 A port of Subset and Exists from Idris1.
The ports are rather straight forward and I have purposefully written
the documentation to be beginner friendly.

Note, I have diverged from Idris1 over the naming of the projection
functions to make them consistent with `Pair` and `DPair`.
2020-07-04 11:03:14 +01:00
Alex Gryzlov
afde930e7a
Vect updates (#335) 2020-07-04 11:02:04 +01:00
Guillaume ALLAIS
bd14d37ddc [ fix ] make some exports public 2020-07-03 12:01:09 +01:00
Jan de Muijnck-Hughes
5abf053818 Fixed visibility of some list functions. 2020-07-03 11:59:55 +01:00
Niklas Larsson
6673f49731 Convert Data.Buffer to HasIO 2020-07-01 23:33:30 +02:00
André Videla
cec56561c6
Merge pull request #387 from LibreCybernetics/fix-export-vect
Make Applicative implementation of Vect n public export.
2020-07-01 17:26:08 +01:00
Edwin Brady
e7830b2b40 Merge github.com:idris-lang/Idris2 into lazy-lazy 2020-07-01 11:59:35 +01:00
Edwin Brady
0d4db3ee75 Add 'force' and 'delay' as functions
Since Force and Delay are keywords now, these may help in higher order
cases in particular.
2020-07-01 11:35:27 +01:00
Mark Barbone
4916dd23a9
Make Data.Vect linear (#333) 2020-06-30 15:05:19 +01:00
Denis Buzdalov
77f1d69acb Injectivity and similar properties were added for lists'a append. 2020-06-30 17:00:47 +03:00
Denis Buzdalov
df60e07962 List's snoc injectivity property was renamed approporiately. 2020-06-30 13:18:42 +01:00
Fabián Heredia Montiel
e488c6cf0e Make applicative implementation of Vect public export 2020-06-29 18:27:57 -05:00
Niklas Larsson
53621f84c5
Merge pull request #370 from ShinKage/ansi
Adds ANSI codes support in contrib
2020-06-29 19:43:46 +02:00
André Videla
8d04881356 Add Kleisli arrow operators to contrib 2020-06-27 22:02:05 +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
Giuseppe Lomurno
28018d9573 Fixed typo 2020-06-26 21:26:36 +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
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
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
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
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
Stiopa Koltsov
c140605a0f Extract Prelude.Basics, Prelude.Uninhabited from Prelude 2020-06-22 18:10:06 +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