Commit Graph

161 Commits

Author SHA1 Message Date
Edwin Brady
824b661cd5 Update bootstrap scheme
The library code uses a new feature, and it needs to be able to build
with the bootstrap code (though, fortunately, not with idris2-boot)
2020-05-22 18:06:04 +01:00
Edwin Brady
0958f1fd8b Keep inlining %tcinlines under let
This fixes a productivity issue with map in the parser library
2020-05-22 17:52:20 +01:00
Edwin Brady
69ec410890 Add AllGuarded flag for functions
This is added to functions which are guaranteed to be productive. The
check is currently very conservative - just added when every clause is
constructor headed (or headed by an AllGuarded function), and there are
no other function applications.
2020-05-22 17:27:18 +01:00
Edwin Brady
a5c2c211a1 Add %tcinline flag to high level syntax
This allows a function to be inlined for totality checking purposes
only. So, for example, (>>=) might be a function, but if it evaluates to
something constructor guarded in some context, then it might still be
productive.
2020-05-22 16:01:47 +01:00
Edwin Brady
088bb52f58 Some productivity checker fixes
Getting there... it still needs to be a bit cleverer at allowing
"obviously productive" functions before we can switch it on though.
2020-05-22 15:08:42 +01:00
Edwin Brady
b6a3c51129 A bit of shuffling in the CHANGEGLOG 2020-05-22 14:21:48 +01:00
Edwin Brady
6494241c11 Remove some noise from error messages
There's no point in wrapping all the case blocks, since this is an
internal detail, and it distracts from the proper location of the error.
2020-05-22 14:19:54 +01:00
Edwin Brady
b27a835e58 Recoverability wasn't quite right
It needs to take into account that solving other names might cause
unification errors to succeed, so only give up if there's conflicting
concrete constructors
2020-05-22 14:02:12 +01:00
Edwin Brady
6d946fed7f Evaluate with tcinline under Delay
If we never evaluate under Delay at all, we won't inline interface
methods, which means productive things defined in an interface can never
be today. So, make sure to set the tcinline flag before quoting the
Delayed closure.
2020-05-22 13:30:07 +01:00
Edwin Brady
d0af73a295 Abandon delayed operators if unrecoverable
If we're delaying because of a unification failure, there's no point in
trying again. This can massively speed up (or maybe I should say "unslow
down") error reporting if there's ambiguity because the elaborator won't
be exploring some paths which can never succeed.
2020-05-22 13:25:08 +01:00
Edwin Brady
4273c24434 Don't rerun delayed elaborators so often
Run once ignoring errors to make progress on interfaces/determining
arguments, then again in full. Second step isn't needed since it was
just covering up an earlier bug.
This means that some errors under lots of delays are reported quicker,
though I still haven't completely got to the bottom of that one.
2020-05-22 09:35:55 +01:00
Edwin Brady
68d73816ab Temporary fix in package parser
I've overdone the ambiguity limit...
2020-05-21 23:11:43 +01:00
Edwin Brady
f3b02d3ac5 Fix error in retryDelayed
In which delayed elaborators which arise during other delayed
elaborators might not get run, leading to a hole, so if there's an error
in the delayed elaborator you might just see that there's a hole still
to resolve.

The down side of this, at least in the example that prompted it, is that
it can take a while for an unresolvable ambiguity error to be reported
while it explores everything. even if there's only a few possibilities.
I will try to think of something...
2020-05-21 23:04:36 +01:00
Edwin Brady
1e570f5895
Merge pull request #96 from ziman/fix-impl-rebuild
Exclude `DN` from `Hashable Name`
2020-05-21 19:20:45 +01:00
Edwin Brady
b0b3861498
Merge pull request #94 from melted/win_bootstrap
Windows support
2020-05-21 19:19:51 +01:00
Edwin Brady
17ee7a293a
Merge pull request #92 from ska80/base-clock
Move System.Clock from 'contrib' to 'base'
2020-05-21 19:16:55 +01:00
Edwin Brady
760f4c6ec0
Merge pull request #89 from LibreCybernetics/split-parser
Split Parser into Source(.idr) and Package (.ipkg) (Part 1)
2020-05-21 19:15:42 +01:00
Fabián Heredia Montiel
af85cbefa7 Extract Common Lexer Utilities 2020-05-21 12:52:26 -05:00
Fabián Heredia Montiel
5265c70c71 Extract Common Lexer Rules 2020-05-21 12:52:26 -05:00
Fabián Heredia Montiel
acaddc1e9d Rename module Parser.Rule to Parser.Rule.Source 2020-05-21 12:52:26 -05:00
Fabián Heredia Montiel
662782503f Rename module Parser.Lexer to Parser.Lexer.Source 2020-05-21 12:52:26 -05:00
Matus Tejiscak
b39f1fd161 Ignore DN layers in Hashable Name.
So that hashes do not depend on irrelevant information,
such as line/column numbers of interface implementations.
2020-05-21 19:41:04 +02:00
Edwin Brady
492a6bc30f Add network to library search paths
I don't know why this works for me locally but not on travis, although
it is harder for me to be sure this machine is completely clean! So the
easiest way to find out if this fixes the problem is probably just to
try it...
2020-05-21 17:47:46 +01:00
Edwin Brady
02ac3c9945 Forgot to add some test files! 2020-05-21 17:22:30 +01:00
Edwin Brady
941c8b1ab5 Point bootstrap tests at the right place
We also need to separate building the runtests binary from running the
tests, because runtests refers to the boostrap libraries, and the tests
refer to the newly built libraries.
This worked locally, using inconsistent TTC versions for the bootstrap
version and new version, but let's see what it does on a clean machine
2020-05-21 17:11:12 +01:00
Edwin Brady
4ed38bd47d Try to fix bootstrap script
I think the tests are using the libraries from the bootstrap Idris 2, not
the just built Idris 2, so if the ttc formats aren't idential the tests
won't work. Let's see if that theory is correct...
2020-05-21 16:32:10 +01:00
Edwin Brady
bd093e9cba Propagate totality options on methods
As in Idris 1 - if an interface declares a method as total or covering,
then all implementations have to satisfy that.

Temporarily turn off %default directive again, at least until totality
checking works as it should (this is probably better than removing it
from various places because I'll forget to put them back)
2020-05-21 16:04:22 +01:00
Niklas Larsson
d50bb099ea Windows support 2020-05-21 15:13:06 +02:00
Edwin Brady
0f724fbc7f Report errors on totality check failure
This means temporarily removing some '%default total' from the libraries
and tests, since the input for codata checking isn't right yet (it needs
appropriate use of inlining)
2020-05-21 13:08:19 +01:00
Kamil Shakirov
806c993d99 Move System.Clock from 'contrib' to 'base' 2020-05-21 17:00:09 +06:00
Edwin Brady
8291c8bbeb Add runtime error for unhandled cases
Should have done this ages ago, it was much easier than I expected...
this adds an explicit error clause before running the pattern match
compiler for runtime case trees, but only if the coverage checker finds
there are missing cases.
2020-05-21 10:54:22 +01:00
Edwin Brady
5b4e1492a8
Merge pull request #91 from ska80/patch-1
Correct ‘Installation problem’ issue template
2020-05-21 10:07:13 +01:00
Marek L
1a998d8944 Fix typo seperate -> separate in System/Path.idr
https://www.grammarly.com/blog/separate-seperate/
2020-05-21 09:28:11 +01:00
Kamiλ Shakirov
2c85940031
Correct ‘Installation problem’ issue template 2020-05-21 09:33:47 +06:00
Edwin Brady
b2e7c40da9 Remove duplicate template 2020-05-20 22:04:22 +01:00
Edwin Brady
f819c0b855
Update installation-problem.md 2020-05-20 22:03:14 +01:00
Edwin Brady
987b2b0a77
Update feature-requests-and-proposals.md 2020-05-20 21:59:14 +01:00
Edwin Brady
918bf58763 Copy issue templates from Idris2-boot 2020-05-20 21:51:58 +01:00
Edwin Brady
c98d8a3e55
Merge pull request #88 from ohad/network-ffi
libs/network: Port FFI calls from deprecated interface to `%foreign` pragma
2020-05-20 21:44:03 +01:00
Edwin Brady
bf5bfba712
Merge pull request #87 from ska80/prefix-update
Remove stale src/IdrisPath.idr on each 'make clean' run
2020-05-20 21:42:45 +01:00
Edwin Brady
215ad99308
Merge pull request #86 from andylokandy/just
Add a total version of the fromMaybe
2020-05-20 21:41:35 +01:00
Edwin Brady
2decd88152
Merge pull request #85 from andylokandy/fold
Add List folds without default value
2020-05-20 21:39:45 +01:00
Edwin Brady
dd28e53c5f
Merge pull request #84 from LibreCybernetics/split-parser-support
Split Parser.Support
2020-05-20 21:38:23 +01:00
Fabián Heredia Montiel
6a5d6647c1 Split Parser.Support 2020-05-20 15:00:42 -05:00
Ohad Kammar
1945619db7 libs/network: Port FFI calls from deprecated interface to %foreign pragma 2020-05-20 20:09:56 +01:00
Kamil Shakirov
ebb98700bf Remove stale src/IdrisPath.idr on each 'make clean' run
${PREFIX} can now be properly changed on each rebuild
2020-05-21 00:38:43 +06:00
andylokandy
a51a665668 Reuse foldr1 in foldr1' 2020-05-21 02:35:18 +08:00
andylokandy
5252a7ae3b Add a total version of the fromMaybe 2020-05-21 02:11:35 +08:00
Edwin Brady
e292f18029 Update installing instructions in docs 2020-05-20 19:09:26 +01:00
andylokandy
8de668f1a4 Add folds without default value to List 2020-05-21 02:09:14 +08:00