Commit Graph

963 Commits

Author SHA1 Message Date
Kamil Shakirov
15f6e863c4 Add implementation of Integral for Nat 2019-11-15 17:46:26 +06:00
Edwin Brady
a3dc1ff228 Add ITransform to TTImp
This is for rewrite rules/transformations which arise from partial
evaluation. Details not yet implemented.
2019-11-13 17:57:39 +01:00
Alex Gryzlov
742f8e662a fix total006 test 2019-11-12 17:03:13 +03:00
Alex Gryzlov
f0ca75b537 add some lib fuctions from Idris1 2019-11-12 15:58:21 +03:00
Alex Gryzlov
148698e790 misc fixes and refactorings 2019-11-12 15:58:04 +03:00
Brian Wignall
fc9f2a995d Fix small double-and typo 2019-11-11 16:38:53 -05:00
Edwin Brady
ca3ea38cde Make sure Force is erased for termination checker
But only for 'Lazy', not for 'Inf'. This is necessary to build the size
change graphs correctly.
2019-11-11 19:35:23 +00:00
Arnaud Bailly
cc6dc2839e
implement GetOptions and correctly reply nil when no holes 2019-11-11 09:28:11 +01:00
Arnaud Bailly
fe4fb532cd export Network.Socket functions fix #152 2019-11-11 08:38:10 +01:00
Arnaud Bailly
b536a4b272
fix compile errors following merge 2019-11-10 15:16:18 +01:00
Arnaud Bailly
3eeac400fb [wip] output from IDE mode 2019-10-31 07:14:46 +01:00
Arnaud Bailly
58e2ae2de8 make tests pass, tweaking repl's output 2019-10-31 07:14:46 +01:00
Arnaud Bailly
f4cc131323 extracted REPL result to a proper type and display separately
tests are not passing due to minor discrepancy: missing the 'Bye for
Now!" end message...
2019-10-31 07:14:46 +01:00
Arnaud Bailly
4485b16ef8 [wip] process returns result object instead of printing directly 2019-10-31 07:12:58 +01:00
Arnaud Bailly
85e6e9ca7a handle more commands in IDE mode 2019-10-31 07:09:43 +01:00
Arnaud Bailly
ed27d32392 better support for IDE mode
protocol expects commands to be terminated with a a (:return ...)
expression, replace several use of putStrLn by printResult or printError
2019-10-31 07:09:43 +01:00
Michael Morgan
9190ccf883 Add replicate to base/Data.List. 2019-10-29 16:08:13 -07:00
Michael Morgan
2a014d1e19 Add zip functions to base/Data.List.
This includes the following functions: zipWith, zip, zipWith3, zip3
2019-10-29 15:51:15 -07:00
lodi
76ff99d370 allow overriding racket/chicken paths through environment variables
This is to help Idris2 codegen the correct scripts on NixOS where
Racket and Chicken aren't installed in the standard locations, and
the /usr/bin/env trampoline is disabled at package build time.
This now matches the existing Chez behavior.

Also, fixed the test runner to restore the correct working directory
after a failed test, and fixed the top-level Makefile to allow the
IDRIS2_VERSION variable to be queried without building the project.
2019-10-28 22:44:16 -04:00
Molly Miller
0fb873949f Implement Debug.Trace, from Idris 1's base package 2019-10-28 20:23:11 +00:00
Ohad Kammar
7e8642e8f8 Fix a stack overflow with a tail recursive list integer length function
Relates to #133 and #135.
2019-10-27 08:26:06 +02:00
Ohad Kammar
fd980bc92f Add tail-recursive versions for most of the Data.List functions
Also include proof the tail-recursive versions are extensionally equivalent to the non-tail-recursive one

I'm a bit worried that some of those proofs came through, as
visibility modifiers should get in the way. If they cause problems at
some future point, just delete/comment them out.
2019-10-27 04:07:01 +02:00
Ohad Kammar
fa29941819 Add DIY syntax for:
1. with-proof construct
2. equational reasoning

temporarily, until Idris2 supports those features
2019-10-27 04:05:31 +02:00
Edwin Brady
ab98b4d3c9 Print banner before typechecking
Otherwise it hides the errors
2019-10-26 13:39:50 +01:00
Michael Morgan
e6121e0935 Remove trailing whitespace from Idris sources.
This is the result of running the command:

$ find . -name '*.idr' -type f -exec sed -i -E 's/\s+$//' {} +

I confirmed before running it that this would not affect any markdown
formatting in documentation comments.
2019-10-25 14:24:25 -07:00
Edwin Brady
f09138d508 Fix broken test 2019-10-25 17:32:29 +01:00
Edwin Brady
dab2bb36c1
Merge pull request #136 from clayrat/sourcedir
Add 'sourcedir' option to IPKG
2019-10-25 14:09:54 +01:00
Edwin Brady
3b73bf2813
Merge branch 'master' into sourcedir 2019-10-25 14:07:52 +01:00
Edwin Brady
779b09086b
Merge pull request #135 from ohad/bugfix-#133
Bugfix #133
2019-10-25 14:06:50 +01:00
Edwin Brady
da1964ce3d
Merge pull request #134 from ohad/bugfix-#109
Add multiple-parameter test as idris/basic029
2019-10-25 14:05:45 +01:00
Edwin Brady
c458957bd6 Get correct namespace in parameters blocks
Fixes #132. When getting the names in the block, we need to return the
fully explicit name, because we can't assume they'll all be in the same
namespace as we can have namespaces inside parameters blocks.
2019-10-25 14:03:15 +01:00
Alex Gryzlov
fcb337b3dc fix dir order & add comment 2019-10-24 20:45:16 +03:00
Alex Gryzlov
54ac723744 add sourcedir option 2019-10-24 20:33:28 +03:00
Ohad Kammar
604a55591b Bugfix #133: turn HasNames (List a) tail-recursive 2019-10-24 12:55:35 +03:00
Ohad Kammar
0cbb7d627c Merge branch 'master' of github.com:edwinb/Idris2 2019-10-24 00:07:30 +03:00
Ohad Kammar
90927cd886 Add multiple parameter block to test suite 2019-10-24 00:06:57 +03:00
Edwin Brady
bd96cf11be Add logTimeRecord
This allows recording cumulative time for specific operations, e.g. to
check how much time unification has taken overall. Not used in the
code as things stand, but useful enough as a debugging/profiling gadget
that I think it's worth committing.
2019-10-23 18:31:31 +01:00
Edwin Brady
e7a47178f2 Some micro-optimisations
Just a small effect, but noticeable, from avoiding branching the context
where it's not needed (in Ambiguity) and hand-inlining the Functor
instance for Binder in thin.
2019-10-23 18:31:31 +01:00
Edwin Brady
69992d483b
Merge pull request #131 from ohad/bugfix-#109
Add support for multi-parameter blocks
2019-10-23 18:29:17 +01:00
Ohad Kammar
2e41a3941f Add support for multi-parameter blocks
Fixes #109
2019-10-22 19:45:00 +03:00
Edwin Brady
a6d1d1b305 Remove a not-optimisation
If we're unifying applications, checking for conversion first is not a
shortcut because if it fails, we just have to redo the work, and if it
succeeds, that's more or less what we'd have done anyway! This is mostly
an issue when unifying really big expressions, which still take a long
time, but at least it's not as long.
2019-10-20 17:51:14 +01:00
Edwin Brady
83673b7295
Merge pull request #125 from msmorgan/list-head-tail
Add `head` and `tail` to base/Data.List.
2019-10-19 14:00:08 +01:00
Edwin Brady
da2b8365e2
Merge pull request #124 from clayrat/fix-clean
Fix --clean option
2019-10-19 13:58:52 +01:00
Edwin Brady
a1116632ae
Merge pull request #123 from abailly/with-match-constants
allow matching constants in with clauses
2019-10-19 13:56:41 +01:00
Edwin Brady
13a107e5ad
Merge pull request #121 from ohad/bugfix-#115
Bugfix #115
2019-10-19 13:55:12 +01:00
Edwin Brady
1a6c314d15
Merge pull request #119 from timsueberkrueb/add-missing-exports
Add some missing public exports
2019-10-19 13:53:23 +01:00
Edwin Brady
f6fd616d75
Merge pull request #118 from clayrat/parens-delay
Parenthesize delayed types/terms in errors
2019-10-19 13:46:55 +01:00
Edwin Brady
e680306321
Merge pull request #105 from ska80/version+tag
Add an optional version tag when building in between releases
2019-10-19 13:46:21 +01:00
Edwin Brady
7fab0110d3 Merge branch 'akuhlens-master' 2019-10-19 13:41:57 +01:00
Edwin Brady
1c304384e6 parseCmd might be empty 2019-10-19 13:41:25 +01:00