Commit Graph

6905 Commits

Author SHA1 Message Date
Jeremy W. Sherman
429db44ecb test/pkg003: Remove generated executable
It was trying to rm -f a similar but different filename, which left an
executable hanging around after the test.
2015-10-23 19:46:50 -04:00
Jeremy W. Sherman
a636f96bdc Update pkg004/expected for more specific error message 2015-10-23 19:46:22 -04:00
Jeremy W. Sherman
28a26874b9 Replace isNothing+fromJust with case
Thanks @melvar.
2015-10-23 16:54:45 -04:00
Jeremy W. Sherman
6f58d99c89 CHANGELOG: Note new iPKG executable = "filename" syntax 2015-10-23 16:11:49 -04:00
Jeremy W. Sherman
bd28c5f589 PParser.hs: filename: Report the specific failed check on error
This makes the error message more specific and so more useful to the
person trying to debug their iPKG file.
2015-10-23 16:11:49 -04:00
Niklas Larsson
f0f1d72848 Merge pull request #2761 from melted/fix_pkg_opts
Make the pkg tests take the same display options as the other tests.
2015-10-23 15:39:41 +02:00
Niklas Larsson
31d6ed1e42 Make the pkg tests take the same display options as the other tests.
"--nocolour --quiet --consolewidth 80"
2015-10-23 14:20:19 +02:00
Niklas Larsson
5a8536ad14 Merge pull request #2677 from zgrannan/repl-check-operator
Parse operators as expressions in the REPL
2015-10-23 13:51:27 +02:00
Niklas Larsson
68c1747cb1 Merge pull request #2739 from shlevy/gmp-dependency
Declare a dependency on gmp when the gmp flag is set.
2015-10-23 13:35:48 +02:00
Niklas Larsson
da672ec706 Merge pull request #2753 from mrmonday/set-options
Keep :set options in sync.
2015-10-23 13:34:12 +02:00
Edwin Brady
d7794a606a Merge pull request #2755 from Legogris/patch-1
Update Mystery Word example code
2015-10-21 08:34:33 +01:00
Edwin Brady
559a903c9b Merge pull request #2715 from cmcl/fix-effect-comment
Fixed comment of Effect type; ordering incorrect and vague.
2015-10-21 08:31:06 +01:00
Edwin Brady
3d5ead30c9 Merge pull request #2691 from mitchellwrosen/patch-1
pure -> pureM in depeff tutorial
2015-10-21 08:27:37 +01:00
Robert Edström
f4ed74c7cf Update Mystery Word example code
* Make it typecheck (previous version of game function didn't)
* Make it more readable (if instead of case over bool, explicit precondition on NewWord)
2015-10-20 16:56:36 +02:00
Robert Clipsham
ce35f7a973 Keep :set options in sync.
This change will keep tab completion for `:set`, `:help`, and parsing in sync
as new options are added. Documentation has also been updated with all options.
2015-10-19 16:04:51 +01:00
Edwin Brady
06edf43977 Add implicit lambdas for top level implicits
They shouldn't really be treated differently from scoped implicits
during elaboration... Fixes #1536
2015-10-19 00:05:41 +01:00
Edwin Brady
c7bed76d1f Better disambiguation with type class methods
If a type class resolution fails in an unrecoverable way (i.e., it
hasn't been postponed due to missing arguments) then it won't be one of
the things we're choosing between in type-based disambiguation, so rule
it out.

Fixes #2701
2015-10-18 00:39:19 +01:00
Edwin Brady
c6a8862798 Add %deprecate directive
Usage:

%deprecate [name] [optional reason, as a string literal]

If 'name' is used anywhere, display a warning that it is deprecated,
along with the message.

e.g. perhaps we should shortly add:

%deprecate Float "Use Double instead. Float will be removed soon."
2015-10-17 23:22:55 +01:00
Edwin Brady
53f46510bc Tidy up name warnings in Prelude 2015-10-17 23:22:29 +01:00
Edwin Brady
47b83b8d41 Change type of HVect.put/get/update so auto works
auto implicits need to go after the arguments they refer to, because
elaboration works left to right, and until we have better rules they may
end up solving things too early if we're not careful.

Currently: Proof search will start as long as no metavariables in the
goal type correspond to positions in the data type where an argument is
in constructor form (i.e., solving by that constructor would work
trivially, thus solving the metavariable too early).

Fixes #2656
2015-10-17 20:26:15 +01:00
Edwin Brady
a35ccd6adb Update Eff constructors to remove warnings 2015-10-17 20:22:08 +01:00
Edwin Brady
da914af83e Consistency of implicit/pattern name binding rules
We've always said that the rules for binding names in patterns are the
same as the rules for binding names in implicits, i.e. a name beginning
with a lower case letter, not applied to anything, will be bound
implicitly, or treated as a pattern variable. This hasn't actually
always been quite true, even though it was supposed to be...

Correspondingly, added a warning for constructor names which may be
unexpectedly bound implicitly.

This patch changes the pattern binding rules so that it is the case.
Fixes #2653
2015-10-17 18:44:00 +01:00
Edwin Brady
a458e29d09 Take care when calling allNamesIn
If we've expanded alternatives, the term could be very big, and we'll
get the same results if we call before expanding alternatives. If we do
need to know all the names a user has written in a term, call before
expanding the alternatives.

This addresses part of the slowness identified in #2657
2015-10-17 17:09:16 +01:00
Edwin Brady
83f0af13fb Display expected type of RHS in error messages
Also added %error_reverse annotations on IO so that IO related messages
are more readable. This improves the error in #2672.
2015-10-17 14:30:36 +01:00
Edwin Brady
db0787555d Merge "add definition" and "add missing" commands
If a function already exists, then adding a definition will now add the
missing cases (so in general, \d in vim or corresponding commands in
other editors will now add all the necessary clauses for a covering
definition.)
2015-10-17 00:01:27 +01:00
Edwin Brady
8996abfa8e Parse to line now reads whole definition
Instead of stopping at the first declaration after it reaches the line
it wants, stop at the first non-pattern-match, so that it still reads
the entire definition to avoid strange totality errors. This mostly
helps the vim mode, and :addmissing.
2015-10-17 00:01:27 +01:00
David Christiansen
c98e24f2cc Merge pull request #2746 from david-christiansen/pruviloj
Elab updates
2015-10-16 19:47:35 +02:00
David Raymond Christiansen
f7e1990ce4 Add lookup of FunArgs for global names to Elab
This makes it possible to write elaborators for term languages that use
Idris's plicity information. As a test of this, the test suite now
includes a mini-implementation of a subset of Agda's reflection using
Elab.
2015-10-16 18:55:24 +02:00
David Raymond Christiansen
6a208f71a6 Fix docstrings for apply and matchApply 2015-10-16 14:36:44 +02:00
David Christiansen
c5f5dab91e Merge pull request #2741 from david-christiansen/pruviloj
Pruviloj-related updates
2015-10-16 07:56:55 +02:00
David Raymond Christiansen
5323b12865 Remove obsolete Elab primitive from Term.hs 2015-10-16 01:41:57 +02:00
David Raymond Christiansen
5330e8a00c Simplifications to Elab
apply is simplified and forget has been moved to library code.
2015-10-16 01:24:38 +02:00
David Raymond Christiansen
ab62c98f99 Make cycle test work with Curses Idris 2015-10-16 01:02:26 +02:00
Shea Levy
bf657b5169 Declare a dependency on gmp when the gmp flag is set.
Fixes #2499
2015-10-15 15:09:24 -04:00
David Raymond Christiansen
1edba410d4 Add environment argument to Elab.Tactics.check
Now, type checking can be performed in arbitrary environments.
2015-10-15 14:42:49 +02:00
David Raymond Christiansen
68c519e532 Convert comments in WHNF.hs to Haddock 2015-10-15 13:25:25 +02:00
Niklas Larsson
d2f892b502 Merge pull request #2728 from jeremy-w/jeremy-w/ipkg-allow-arbitrary-executable-names-2721
IPKG: Relax requirement that executable name be a valid identifier [#2721]
2015-10-14 23:22:39 +02:00
Niklas Larsson
aabda6e19c Merge pull request #2735 from LeifW/bump_vector_constraint
Bump vector constraint to allow 0.11.x
2015-10-14 22:53:25 +02:00
Leif Warner
304a7e7ce2 Bump vector constraint to allow 0.11.x
fixes #2734
2015-10-14 12:38:52 -07:00
Edwin Brady
8bd99edf3e Detect cycles in imports
Also improve import chasing, by only following imports in the current
source tree (so not in dependencies we happen to have the source for,
which will be part of other packages)
2015-10-14 15:37:21 +01:00
Edwin Brady
fe38aac9c9 Cache information when module chasing
In particular - don't parse import lists more than once for each file,
and once a part of the import tree is built, don't build it again.

Fixes #2730
2015-10-13 23:51:24 +01:00
Edwin Brady
4249691bd8 Check whether type declarations are actually types
We never did bother to check, and they are unusable if they don't have
a constructor with either Type/UniqueType... Fixes #2698
2015-10-13 23:51:24 +01:00
Jeremy W. Sherman
9229b623df PParser.hs: filename: Add check that path is valid
In addition to ensuring the filename is:

- Non-empty
- Filename only (no directory separator)

This also checks:

- No invalid characters are present
2015-10-13 14:56:14 -04:00
Jeremy W. Sherman
ee589b5475 PParser.hs: Use ConstraintKinds to avoid "illegal tuple constraint"
Fixes compiler error reported by Travis under GHC 7.6 and 7.8.

Thanks @melted for calling this out
(https://github.com/idris-lang/Idris-dev/pull/2728#issuecomment-147666654).
2015-10-13 14:47:13 -04:00
Jeremy W. Sherman
b329791cf1 Add @jeremy-w to CONTRIBUTORS
As encouraged by @melted in
https://github.com/idris-lang/Idris-dev/pull/2728#issuecomment-147667042
2015-10-13 14:44:41 -04:00
David Christiansen
6c4deb24c1 Merge pull request #2718 from david-christiansen/pruviloj
Pruviloj and reflection updates
2015-10-13 13:43:55 +02:00
Niklas Larsson
16ed52de63 Merge pull request #2719 from jeremy-w/jeremy-w/edit-elaborator-reflection
docs: Update the "Interactively Building Elab Scripts" section
2015-10-13 11:55:02 +02:00
Jeremy W. Sherman
9c8d8cc424 CHANGELOG: Fix typo: mutliple -> multiple 2015-10-13 00:12:40 -04:00
Jeremy W. Sherman
4f96945a3b Test that IPKG rejects executable with directory component
This ensures it really is a filename, and prevents something unwanted like
telling it to write to ../something or /something.
2015-10-13 00:00:59 -04:00
Jeremy W. Sherman
a22dd61eac Add test that quoted strings with valid filenames are OK
This tests the new functionality added to support hyphens in filenames
(see: https://github.com/idris-lang/Idris-dev/issues/2721).
2015-10-12 23:33:03 -04:00