Commit Graph

1220 Commits

Author SHA1 Message Date
Edwin Brady
085f6806da
Merge pull request #322 from rbarreiro/copy_json_from_idris_dev
added json
2020-04-27 15:29:44 +01:00
Edwin Brady
f2a41d5afa
Merge pull request #311 from Kaiepi/racket
Make a couple improvements for the Racket backend
2020-04-27 15:28:17 +01:00
Edwin Brady
d0a9f9e9a6 Move takeBefore/takeUntil to Data.Stream
They're not total, so shouldn't be exported from the Prelude - they are
kept there for range syntax though.
2020-04-27 15:25:25 +01:00
Edwin Brady
df9e4771e8
Merge pull request #318 from ska80/fix-get-line-and-eof
Check for EOF when reading from an input port
2020-04-27 15:25:06 +01:00
Edwin Brady
61fae5c040
Merge pull request #310 from Kaiepi/bsd-builds
Fix builds on *BSD
2020-04-27 15:21:37 +01:00
Edwin Brady
cbd88c9f2e
Merge pull request #316 from abdelq/master
Adding corresponding toFileError for FileExists
2020-04-27 15:17:34 +01:00
Edwin Brady
2fd1c40056
Merge pull request #314 from MarcelineVQ/using-fix
'using' multiple named instances in scope fix
2020-04-27 15:16:12 +01:00
Edwin Brady
c75af6d116 Update test output 2020-04-27 14:45:06 +01:00
Edwin Brady
2362e40f6b Fix for multiplicities in holes
Still not perfect, but usages in holes were wrongly reported in nested
case blocks due to checking their usage count too often.
2020-04-27 14:28:30 +01:00
Edwin Brady
e208ea7129
Merge pull request #298 from ziman/records
RFC: Dot syntax for records
2020-04-27 14:28:19 +01:00
Edwin Brady
9391b72507
Merge pull request #305 from ska80/prelude-inline-doc
Port prelude's inline API documentation from Idris 1
2020-04-27 13:38:40 +01:00
Edwin Brady
c95c4c6c0c
Merge branch 'master' into prelude-inline-doc 2020-04-27 13:38:29 +01:00
Edwin Brady
1262ca2fde
Merge branch 'master' into records 2020-04-27 13:36:18 +01:00
Edwin Brady
b9907fbb21
Merge pull request #254 from jfdm/literate-modes
Enhance literate mode to recognise multi-modes.
2020-04-27 13:33:55 +01:00
Edwin Brady
ff86f6f834 Implement occurs check properly (finally!)
Instead of the previous unreliable hack, actually look for occurrences
of the solved metavariable. Block if there are any, and fail if there
are any under a constructor. I had expected this to hurt performance
quite a bit, but it seems it doesn't.
This was prompted by #304, which is now partly fixed, but there's still
a refinement to unification needed to fix it fully (and at least it
doesn't segfault due to the cycle now!)
2020-04-27 12:17:45 +01:00
Fabián Heredia Montiel
73ce287cb4 Remove uneeded dependency on tests.ipkg 2020-04-25 15:30:24 -05:00
Rui Barreiro
bb6aaad373 added json 2020-04-25 19:45:29 +01:00
Edwin Brady
19426ecd14 Better compiling for newtypes
If it's a newtype with an erased WorldVal, turn any case blocks into
non-inlinable let bindings, which is more accurate than the fiddly thing
it was doing.
Also better usage calculation in the inliner (but we still can't inline
lets because we don't know yet which 'case' functions are guaranteed
safe to inline because they don't duplicate variables anywhere. That's
coming!)
2020-04-25 15:54:53 +01:00
Edwin Brady
4947a9981a Fix lambda multiplicity check
A bug found via the very handy, but occasionally bad for performance so
off by default, --debug-elab-check. The multiplicity of a lambda type
needs to be checked against the expected multiplicity, not the given
multiplicity. Oops!

If you have any (\0 x => e) or similar, you may find you need to fix a
type error after this update...
2020-04-24 22:28:52 +01:00
Edwin Brady
2a0e5a4254 Don't fully normalise LHS
We no longer need to do this since we now expand fromInteger. And, we
didn't even need to do it fully, because we never needed to normalise
the pattern variable types. This is a big win on code which has a lot of
type level computation.
2020-04-24 20:26:37 +01:00
Matus Tejiscak
07bb57d3a1 Stop using :exec in record004. 2020-04-24 19:14:22 +02:00
Matus Tejiscak
4baa09a7de Sidestep the question of printing floats. 2020-04-24 19:10:23 +02:00
Matus Tejiscak
04a79d0a69 Update CHANGELOG. 2020-04-24 18:01:41 +02:00
Edwin Brady
838e5cbe9e realloc slightly better than malloc+free
Since it may be possible to reuse the space in place, and this all but
eliminates the remaining sys time.
2020-04-24 16:09:31 +01:00
Edwin Brady
0688728eb3 Run time system improvements
We shouldn't free the old heap if it's the right size, because that'll
execute a system call that could be costly. We can just reuse it!
2020-04-24 15:52:12 +01:00
Edwin Brady
2f0c6722e3 Note which holes a constraint is blocking on
Now only retry the constraint if at least one of the blocking holes has
some new information (either that it has been flagged invertible, or
that it is now defined). This can lead to big performance gains on
programs which use dependent types heavily.
2020-04-24 13:40:54 +01:00
Kamil Shakirov
cce312bb15 Check for EOF when reading from an input port
1) Check for EOF when reading from an input port (Chez backend).

2) Fix `getLine` to read and return a string without the trailing newline.
2020-04-24 12:32:58 +06:00
Abdelhakim Qbaich
55bc68a10e Add missing FileExists in toFileError 2020-04-23 23:16:14 -04:00
Abdelhakim Qbaich
4298b50df4 Typo fixes 2020-04-23 23:14:55 -04:00
Matus Tejiscak
8d1a813938 Fix printing namespaced dotted projections. 2020-04-23 23:12:26 +02:00
Matus Tejiscak
682ebbffb5 Wording. 2020-04-23 23:11:13 +02:00
Matus Tejiscak
d4ac7b6f52 Update typesfuns.rst. 2020-04-23 23:05:11 +02:00
Matus Tejiscak
bd1a9e2c04 Fix printing qualified record field names. 2020-04-23 22:29:33 +02:00
Edwin Brady
819c9d7af1 Evaluate primitives (fromInteger etc)
At least as long as the number is small enough (currently set to < 100).
This is because it can open up further evaluation opportunities when
typechecking, and can make the term we're working with smaller - it also
makes display a bit neater.
Overall this makes some pathological cases of terrible performance much
better, without hurting anything else.
2020-04-23 21:21:08 +01:00
Matus Tejiscak
eb5af61ebf Add reference for the dot record syntax. 2020-04-23 21:57:03 +02:00
Edwin Brady
3d8d07621d Some inlining changes
Flags can now be set on implementations too, where the flags get passed
to each of the methods in the implementation. We might want something a
bit more fine grained than this later. Also some small changes to the
way inlining lets is done in the compiler.
2020-04-23 20:01:20 +01:00
MarcelineVQ
896cd486d1 update 'using' regression test
have implementation 'using' regression test also check for multiple named implementations
2020-04-22 16:53:02 -07:00
MarcelineVQ
4b878a8a53 change where openHints is snapshotted
clearing the open hints at the end of elabImplementation was missing the
'using' hints
2020-04-22 16:51:09 -07:00
Fabián Heredia Montiel
7762c1b23f Basic Show instance of NameMap 2020-04-22 14:43:03 -05:00
André Videla
db743eb9c4 update core/TT 2020-04-22 20:39:32 +01:00
André Videla
df82764ce7 merge ProccessData 2020-04-22 20:39:32 +01:00
Jan de Muijnck-Hughes
e091ca5701
Update tests/idris2/literate012/expected
Co-Authored-By: G. Allais <guillaume.allais@ens-lyon.org>
2020-04-22 20:37:07 +01:00
André Videla
6d63dad4b1 Replace RigCount by Semiring operations
This replaces all occurences of pattern matching on RigCount
by functions on generic semirings like `ring0` (erased) `ring1`
(linear) and `maxVal` (unbounded)

Pattern matching is replaced by `isRig1`, `isRig0` or `elimSemi`.
2020-04-22 20:31:38 +01:00
Ben Davies
5a8d9780be Document which Racket packages are required to run Idris 2020-04-22 12:28:45 -03:00
Ben Davies
6314e9144a Add missing racket/math import for Racket codegen 2020-04-22 12:28:41 -03:00
Ben Davies
93871c5fb9 Fix builds on *BSD
This makes it so gmake gets used instead of make on *BSD, refactors how
platforms are handled in general.
2020-04-22 11:09:05 -03:00
Kamil Shakirov
1d2250062b Fix tests 2020-04-22 11:56:08 +06:00
Kamil Shakirov
5b58bf2cc1 Add missing export 2020-04-22 11:21:12 +06:00
Kamiλ Shakirov
0c7b553e23
Oops 2020-04-22 08:48:38 +06:00
Matus Tejiscak
f44d384d63 Fix tests. 2020-04-21 23:47:34 +02:00