Commit Graph

1129 Commits

Author SHA1 Message Date
foss-mc
979424c8e4
Improve Racket supporting code 2020-08-28 19:02:04 +08:00
Guillaume ALLAIS
9c59542081 [ new ] allow auto fields in records 2020-08-28 11:38:10 +01:00
Guillaume ALLAIS
17b3bb8d3d [ fix ] parser for REPL command :log 2020-08-28 09:17:32 +01:00
Guillaume ALLAIS
c17c6fc522 [ log ] stuck functions found during evaluation 2020-08-27 19:42:52 +01:00
russoul
5d156167d3 Add dup 2020-08-27 18:30:31 +01:00
Alex Gryzlov
969f5443a9 additional refactor of Data.String.Parser 2020-08-27 15:27:52 +01:00
Guillaume ALLAIS
1d4c84171d [ refactor ] suggested during SPLV
Main change
===========

The main change is to the type of function dealing with an untouched
segment of the local scope. e.g.

```
weak : {outer, vars : _} -> (ns : List Name) ->
       tm (outer ++ inner) -> tm (outer ++ ns ++ inner)
```

Instead we now write

```
weak : SizeOf ns -> tm (outer ++ inner) -> tm (outer ++ ns ++ inner)
```

meaning that we do not need the values of `outer`, `inner` and `ns`
at runtime. Instead we only demand a `SizeOf ns` which is a `Nat`
together with an (erased) proof that `ns` is of that length.

Other modifications
===================

Quadratic behaviour
-------------------

A side effect of this refactor is the removal of two sources of
quadratic behaviour. They typically arise in a situation where
work is done on a scope of the form

```
outer ++ done ++ ns ++ inner
```

When `ns` is non-empty, some work is performed and then the variable
is moved to the pile of things we are `done` with. This leads to
recursive calls of the form `f done` -> `f (done ++ [v])` leading
to a cost quadratic in the size of `ns`.

Now that we only care about `SizeOf done`, the recursive call is
(once all the runtime irrelevant content is erased) for the form
`f n` -> `f (S n)`!

More runtime irrelevance
------------------------

In some places we used to rely on a list of names `vars` being
available. However once we only care about the length of `vars`,
the fact it is not available is not a limitation.

For instance a `SizeOf vars` can be reconstructed from an environment
assigning values to `vars` even if `vars` is irrelevant. Indeed the
size of the environment is the same as that of `vars`.
2020-08-27 10:14:55 +01:00
Guillaume ALLAIS
d9c0e5938e [ fix ] succInjective does not use its arguments 2020-08-27 10:14:55 +01:00
Guillaume ALLAIS
3a7b72f384 [ fix ] typo in eqTree 2020-08-27 10:14:55 +01:00
Thomas Dziedzic
a7ff5aa71f
implement HVect (#563) 2020-08-26 15:48:19 +01:00
Niklas Larsson
85ae87b07c
Merge pull request #595 from Russoul/master
Eliminate schemeCall
2020-08-25 18:27:48 +02:00
Russoul
720178ca37 Update bootstrap files V3 2020-08-25 18:05:48 +03:00
Russoul
0e408840fd Revert "Update bootstrap files V2"
This reverts commit 9acbdbfcd9.
2020-08-25 17:49:23 +03:00
russoul
9acbdbfcd9 Update bootstrap files V2 2020-08-25 17:31:36 +03:00
russoul
12194ed0b0 Revert "Update bootstrap files"
This reverts commit 906e521a71.
2020-08-25 17:21:39 +03:00
russoul
906e521a71 Update bootstrap files 2020-08-25 16:48:08 +03:00
russoul
3a9b1ac656 Add supporting code 2020-08-25 14:30:57 +03:00
russoul
50ac934747 Merge branch 'master' of https://github.com/idris-lang/Idris2 into master 2020-08-25 13:57:26 +03:00
MarcelineVQ
209de36ba0
add EitherT transformer (#590)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2020-08-25 11:14:09 +01:00
Niklas Larsson
8010f65529
Merge pull request #281 from idris-lang/concat-foreign
Make fastAppend a foreign call
2020-08-25 11:48:15 +02:00
Guillaume ALLAIS
e64a3e910c [ test ] cleanup basic044
All of these internal names are making the output fragile. This
cleanup should allow us to only have to update the golden file
when there is a genuinely interesting change.
2020-08-25 09:33:39 +01:00
Matus Tejiscak
f69443985b Revert addition to ES preamble. 2020-08-25 10:25:45 +02:00
Matus Tejiscak
e9e5ef3d6a Fix FFI specifier. 2020-08-25 10:23:07 +02:00
Matus Tejiscak
1eaecc5d66 Implement stringConcat in Node. 2020-08-25 09:46:35 +02:00
Matus Tejiscak
969a6e1a45 Make fastAppend a deprecated alias of fastConcat. 2020-08-24 19:51:23 +02:00
Matus Tejiscak
362d2204ab Make fastAppend a foreign call. 2020-08-24 19:51:22 +02:00
russoul
b1ec508a02 Eliminate SchemeCall ExtPrim 2020-08-24 19:47:16 +03:00
russoul
594105d5ac Eliminate schemeCall from the library 2020-08-24 19:38:29 +03:00
Alex Gryzlov
ef5299733a
refactor Data.String.Parser (#579) 2020-08-22 08:13:34 +01:00
G. Allais
56209de4ca
[ close #270 ] Add FC to Binder (#296) 2020-08-21 19:03:53 +01:00
Niklas Larsson
83d9374206
Merge pull request #583 from melted/api_ci
Add CI checking for the API
2020-08-21 12:53:04 +02:00
Niklas Larsson
5f1d391242 Make the run script executable 2020-08-21 12:24:23 +02:00
Niklas Larsson
de54c7feee Clean in case TTC version has changed 2020-08-21 12:08:49 +02:00
Niklas Larsson
b37387d394 Add a badge for API CI 2020-08-21 11:54:14 +02:00
Niklas Larsson
2a45854b96 Add CI checking for the API 2020-08-21 11:51:21 +02:00
lodi
3b49b10832
add extraRuntime option for Scheme backends (#578) 2020-08-21 09:34:57 +01:00
G. Allais
da78ac4783
[ new ] topics for logging levels (#569) 2020-08-20 18:45:34 +01:00
Cole Brown
f227735cec Add local to MonadReader interface 2020-08-20 16:33:50 +01:00
Cole Brown
6c3ab219bc Implement MonadReader and related types/instances
This includes:
- ReaderT transformer
- Instances for Functor, Applicative, Monad, MonadTrans, HasIO,
  Alternative
- asks helper function
- Reader alias
2020-08-20 16:33:50 +01:00
karroffel
7d046652d8
add support for more casts from and to BitsN types (#548)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2020-08-20 15:01:09 +01:00
Thomas Dziedzic
5d1b937035
add prim__getNullAnyPtr and prim__castPtr (#525) 2020-08-20 11:52:51 +01:00
Niklas Larsson
8a346e18f2
Merge pull request #580 from ska80/ide-mode-socket-no-banner
Suppress banner when running with --ide-mode-socket option
2020-08-20 11:07:35 +02:00
Ohad Kammar
4f9e3b7297 Make IDEMode respond after executing a consolewidth instruction
emacs's idris-mode seems to hang without a response
2020-08-20 09:52:06 +01:00
Kamil Shakirov
899d425bbf Suppress banner when running with --ide-mode-socket option 2020-08-20 14:18:12 +06:00
Ohad Kammar
310b7a007c Move cong2 from contrib to Prelude.Basics 2020-08-20 07:53:45 +01:00
Ohad Kammar
080fbab20d Insert linearity annotations for cong2
following review by @gallais
2020-08-20 07:53:45 +01:00
stasoid
14604dcf2d Add support for ~~~ code blocks in markdown 2020-08-19 14:08:30 +01:00
Kamil Shakirov
8544e80076 Use the same naming convention for foreign primitives 2020-08-19 14:05:28 +01:00
Kamil Shakirov
1d601384ce Rename --consolewidth option to --console-width for consistency 2020-08-19 11:59:31 +01:00
Niklas Larsson
5905a00fd2
Merge pull request #576 from ShinKage/pretty-compiler-v2
Windows color fix
2020-08-19 12:15:15 +02:00