Commit Graph

6657 Commits

Author SHA1 Message Date
Edwin Brady
57ba18dafb Slightly relax check for proofsearchability
Allow proof search on anything with constructors in the indices.
Even this isn't particularly accurate, so we really need to come up with
a proper rule, but it does lead to the expected result more often than
either trying everything, or ruling out overlapping types.
2015-08-09 16:34:49 +01:00
Edwin Brady
7a5392d414 Display tweak 2015-08-09 16:34:49 +01:00
Jan de Muijnck-Hughes
cd0528a3d6 Merge pull request #2504 from jeremy-w/jeremy-w/testing-fixes
Update testing section of tutorial
2015-08-09 13:32:12 +01:00
Jeremy W. Sherman
056b307e7d Update running text to match code change
Forgot to update the description of what was printed on success
when I updated what was printed on success in both the code and the sample
output.
2015-08-08 15:10:01 -04:00
Jeremy W. Sherman
118d718a62 Restores self-documenting test output
Thanks @jfdm!
2015-08-08 15:06:42 -04:00
Jeremy W. Sherman
6411f5d2f2 Add example of running the tests
This lets the reader get the full experience of the example
and also shows the temporary file path by way of the type-checker output.

This does change the success/failure reporting text to match what I had
written, so I could copy verbatim from my terminal.

The previous success/failure messages had mismatched capitalization
(title case vs sentence case), but their verbosity might have been desirable
for a tutorial, however undesirable verbosity might be when scanning
test output.
2015-08-08 14:42:50 -04:00
Jeremy W. Sherman
b8808681d6 Fix testing example .ipkg syntax
Running it as it was written previously gave a couple errors:

    > idris --testpkg maths.ipkg
    Uncaught error: user error (maths.ipkg:1:1: error: expected: "package"
    module maths
    ^            )

    > idris --testpkg maths.ipkg
    Uncaught error: user error (maths.ipkg:3:1: error: expected: "executable",
        "libs", "main", "makefile",
        "modules", "objs", "opts",
        "sourcedir", "tests"
    module = Maths.NumOps
    ^                     )
2015-08-08 14:33:03 -04:00
Jeremy W. Sherman
b85b98f0d9 Caption code block with relative file paths
Even though I had read the ipkg section before this, it was not clear to me
that I needed to mirror the module structure on-disk in the directory
hierarchy. Providing this info to the reader removes that chance for confusion.
2015-08-08 14:28:01 -04:00
Jeremy W. Sherman
d1e9bf86c8 Rephrase intro to testing tutorial
Add verbiage to make clear that the test framework does no aggregration or
reporting in and of itself.
2015-08-08 14:24:13 -04:00
Niklas Larsson
030da056bc Merge pull request #2495 from BlackBrane/master
Remove spurious Data.Fin imports (now reexported by Vect)
2015-08-06 18:09:37 +02:00
Niklas Larsson
6784f7a65c Merge pull request #2376 from jfdm/logging-effect
Effectful Logging.
2015-08-06 18:09:15 +02:00
Jan de Muijnck-Hughes
44dad1c45e Fixed missing entry in Cabal file. 2015-08-05 22:08:21 +01:00
Jan de Muijnck-Hughes
99b8194f09 Fix access for file and cabal files. 2015-08-05 22:07:51 +01:00
BlackBrane
afe9481871 Make clear that sum' is a synonym for concat 2015-08-03 14:02:34 +02:00
Edwin Brady
b6c9ef8334 Small documentation updates 2015-08-03 01:25:09 +01:00
BlackBrane
44ca9c2d6a Remove spurious Data.Fin imports (now reexported by Vect) 2015-08-02 19:49:43 +02:00
Edwin Brady
5a08c2cdb7 Proof search tweak
When checking types of hints, don't consider the recursive call as an
overlapping constructor type, or lots of things don't get filled in
which should be.
2015-08-02 14:36:06 +01:00
Edwin Brady
96e9b1a79e Variable names in makelemma types
Put the variable names even if they aren't used, so that it's clearer
which is which at the definition site.
2015-08-02 14:36:06 +01:00
Niklas Larsson
a8f3171d56 Merge pull request #2494 from uwap/master
Make --mkdoc follow the sourcedir
2015-08-02 13:58:04 +02:00
uwap
61f02bfee1 Make --mkdoc follow the sourcedir
If you had an ipkg with a sourcedir defined before using the --mkdoc option would fail saying that some source files are missing.
This is because it didn't follow the sourcedir.
2015-08-02 02:50:57 +02:00
Edwin Brady
7095d6c1ed Proof search should only use user visible names
If they are implicits or class arguments, it's fine for 'auto' to see
them since they're only used internally, but interactive proof search
will give odd results if it uses them. So, we make a list of names which
proof search in interactive mode is allowed to use.
2015-08-01 21:12:14 +01:00
Edwin Brady
8dd2a7f078 Make interactive proof search less enthusiastic
Instead of guessing, it will only fill in a metavariable if all of the
available constructors/hints have disjoint types. This means you'll no
longer always get 'Nothing' for Maybe or '[]' for List, but rather
you'll get a new metavariable.

'auto' behaves as before, because the idea there is to find any old
thing with the right type.

It feels like interactive proof search should be a bit more refined,
though, because the idea of that is to find the program you really want,
rather than any old program...

More refinements to this are likely, for example refusing to fill in
with locals if there are clashing types.
2015-08-01 15:57:30 +01:00
Edwin Brady
a4596d92b8 Tidy up 'tidy'(!)
Normalise the return type as well as th arguments.
2015-08-01 15:57:30 +01:00
Edwin Brady
0f80f562a0 Don't want newline after makeCase 2015-08-01 15:57:30 +01:00
Niklas Larsson
2c7563c4e3 Merge pull request #2492 from BlackBrane/master
Refinement & reorganization of Data.Matrix
2015-08-01 15:50:43 +02:00
BlackBrane
d649f2e228 Separate numeric/algebraic matrix ops from basic matrix functions 2015-07-31 17:56:08 +02:00
Niklas Larsson
546458e0d6 Merge pull request #2491 from ziman/ffi-fix
Make `FFI_Exportable` usable with other back-ends
2015-07-31 13:12:26 +02:00
Matus Tejiscak
098656e423 Make FFI_Exportable more generic. 2015-07-31 00:50:03 +01:00
Niklas Larsson
d05f550dc9 Merge pull request #2487 from uwap/patch-1
Fix documentation for distributivity of rings
2015-07-30 22:13:29 +02:00
Edwin Brady
5bd5777fb7 Add :makecase (:mc) to REPL and ide-mode
Replaces a metavariable with a case block, with an _ for the scrutinee
(much like :makewith)

I just got bored of typing these :). There is a corresponding update to
idris-vim.
2015-07-30 16:31:59 +01:00
Niklas Larsson
798958d464 Merge pull request #2486 from worldsayshi/patch-2
Fixed styling for multi line string literal docs
2015-07-30 02:42:07 +02:00
uwap
95fe866302 Fix documentation for distributivity of rings
Rings have a distributivity law between `<.>` and `<+>` not between `<.>` and `<->`
2015-07-30 02:35:59 +02:00
worldsayshi
b1ce657699 Fixed styling for multi line string literal docs 2015-07-30 00:31:17 +02:00
Niklas Larsson
bc4b4852e7 Merge pull request #2485 from worldsayshi/patch-1
Added docs on multiline strings
2015-07-30 00:26:58 +02:00
Niklas Larsson
7fe42e06de Merge pull request #2470 from benjamin-hodgson/2460_multipleFields
Multiple record fields on one line (#2460)
2015-07-30 00:26:43 +02:00
Benjamin Hodgson
f25976d7cb Revert "Allow an optional trailing comma in commaSeparated"
The consensus following the discussion in the pull request
seemed to be by-and-large against allowing trailing commas.
So they're out.

This reverts commit 856d62dd84.
2015-07-29 22:24:10 +01:00
worldsayshi
f5e56a6c96 typo when correcting typo 2015-07-29 18:19:51 +02:00
worldsayshi
b6fd66302e added multi line strings doc and fixed typo 2015-07-29 18:12:21 +02:00
Niklas Larsson
af79c58c9c Merge pull request #2484 from melted/ops
Sync the documentation with opChars in ParseHelpers.hs
2015-07-29 12:55:08 +02:00
Edwin Brady
ebf7a76305 Slightly less annoying name choice
x, y, z, x1, y1, ... instead of x, x1, x2, ... when no other hint for
names is given
2015-07-29 11:35:25 +01:00
Edwin Brady
b49c2fd6e3 Better display of classes in makeLemma 2015-07-29 11:27:37 +01:00
Niklas Larsson
a26562a666 Sync the documentation with opChars in ParseHelpers.hs
# and backslash was missing, and underscore isn't an operator char
2015-07-29 00:20:34 +02:00
Edwin Brady
1b96024f48 Add a couple of convenience functions in Data.Vect
I often want to do this sort of thing, perhaps others do too...
2015-07-28 21:43:02 +01:00
Edwin Brady
874ac98f40 Allow empty instance declarations in mutual blocks
This was supposed to work, but didn't, meaning that it was impossible to
use interactive tools to populate instance bodies in mutual blocks.
2015-07-28 18:17:44 +01:00
David Christiansen
e8b7737df1 Merge pull request #2482 from david-christiansen/issue/2481
Properly reify reflected character constants
2015-07-28 08:29:01 -06:00
David Raymond Christiansen
56869f69db Properly reify reflected character constants
Fixes #2481
2015-07-28 06:59:35 -06:00
Edwin Brady
0e7c076058 Normalise types before detecting parametric args
Otherwise we miss some, and some annoying things fail as a result
(notably, trying to make aliases for type classes in functions)
2015-07-28 10:21:45 +01:00
Edwin Brady
80a2cee339 A few prelude functions/casts 2015-07-28 10:21:44 +01:00
Jan de Muijnck-Hughes
51bbaf91e8 Merge pull request #2480 from jeremy-w/jeremy-w/correct-mathsing-to-testing
Rewrite "mathsing" to "testing"
2015-07-28 09:38:57 +01:00
Jan de Muijnck-Hughes
c157e070a8 Merge pull request #2478 from jeremy-w/jeremy-w/updates-bst-module-reference-to-Btree
Update bst module reference to Btree
2015-07-28 09:38:32 +01:00