Commit Graph

5149 Commits

Author SHA1 Message Date
Edwin Brady
f733bf0e30 Only allow @ patterns on LHS
It's meaningless on the RHS and clashes with explicit instances, so
should be disallowed in the parser.
2014-12-21 01:10:06 +00:00
Edwin Brady
ca4b56311c Update CHANGELOG 2014-12-20 23:43:07 +00:00
Edwin Brady
94be0eb612 Undo dubious optimisation in resolveTC
Since hnf_compute doesn't do what it says, and it's causing some obscure
or complicated type class constraints not to resolve properly.
Fixes #1688
2014-12-20 23:28:30 +00:00
Edwin Brady
4175a7f5cd Coverage checker should ignore hidden arguments
Since they're required to be inferred from other arguments, they make no
contribution to coverage checking.
Fixes #1710
2014-12-20 23:05:23 +00:00
Edwin Brady
57cd38ae11 Fix checkPossible when unifying bound vars
It's not a rigid fail if it's two bound variables that differ.
Fixes #1108
2014-12-20 22:33:33 +00:00
Edwin Brady
87897174e5 Hide other unmatchable patterns
Lambdas, in particular. Fixes #1671
2014-12-20 22:17:03 +00:00
Edwin Brady
0d8a153cb0 New way of dealing with unmatchable patterns
Any term which is not matchable, i.e. a function application or a
repeated variable on the left hand side, is automatically put in a
PHidden. The effect of elaborating PHidden t is to:

1. Delay the elaboration of 't' to the end of elaboration
2. When elaborating t, ensure that its value is already known due to
solving some other unification problem.

If something is PHidden, but not solvable by unification, elaboration
fails.
This finally fixes #323, and probably several other things.
2014-12-20 20:52:46 +00:00
Edwin Brady
98a46fc6ff Use correct error function for PElabError
Fixes #1800
2014-12-20 20:12:42 +00:00
Edwin Brady
ba51147137 Removing matching on PS
This makes it less boring to modify what's in the proof state...
2014-12-20 12:31:41 +00:00
Edwin Brady
c506e9fb36 Lift typecase restrictions on %reflection fns. 2014-12-19 17:50:41 +00:00
Edwin Brady
e086ccf561 Check arguments being matched on are matchable
Specifically, matching on a polymorphic argument should not be allowed
unless some other argument has determined its type.
2014-12-19 17:44:17 +00:00
Edwin Brady
f15f5ef054 Merge pull request #1798 from jfdm/update/readme
Updates to README.md
2014-12-19 15:13:29 +00:00
Edwin Brady
0cc80c6216 Merge pull request #1795 from japesinator/arrow_classes
added subclasses for Arrow
2014-12-19 15:12:20 +00:00
Edwin Brady
17439a0bea Merge pull request #1794 from japesinator/arrow_update
added default definitions for second, ***, &&&
2014-12-19 15:11:54 +00:00
Edwin Brady
e73b193045 Merge pull request #1786 from Heather/examples
remove /examples/ folder, move Makefile to /samples/
2014-12-19 15:10:23 +00:00
Edwin Brady
4c163359e6 Coverage checker fix for nested constants
Need to generate possible cases for constants in constructor arguments
too.
2014-12-19 14:09:06 +00:00
Edwin Brady
ba1f8e3cfb Add missing LHS type check 2014-12-19 13:34:21 +00:00
Edwin Brady
6d54cb3e53 Disallow explicit types on LHS
Except under quasiquotation. This is to prevent any arguments being
specialised to a more specific type than the function type suggests (one
place where typecase can arise).
2014-12-19 13:17:13 +00:00
Edwin Brady
957dd616c2 Fix parameter propagation error
This catches the most blatant attempts at typecase, but there are still
a couple of other sneaky tricks that will get past the checker.
2014-12-19 00:38:19 +00:00
Edwin Brady
a427f212ef Merge pull request #1796 from bmsherman/ExceptT
Use ExceptT instead of ErrorT
2014-12-18 19:58:28 +00:00
Ben Sherman
a4401f916b Import ExceptT type and constructor 2014-12-18 12:17:40 -05:00
Jan de Muijnck-Hughes
f6459a26a2 Updates to README.md
+ Added Headers.
+ Add more comprehensive information over installing idris from hackage and from source.
+ Add links for more information.
+ Reformated existing sections.
2014-12-18 15:46:50 +00:00
bmsherman
1728a6597f Disambiguate forM call 2014-12-18 00:58:10 -05:00
bmsherman
684a578fce Completely replace ErrorT with ExceptT 2014-12-17 23:21:15 -05:00
bmsherman
00f1cd5d2e Use ExceptT instead of ErrorT 2014-12-17 21:24:15 -05:00
Edwin Brady
f7b72a6732 Use idris_alloc for GMP allocation
Now storing VM in a pthread_key (in environments which support pthreads)
meaning that allocation doesn't need to be passed a VM pointer, and so
we can safely use the idris allocator from GMP (and indeed any C library
which wants to use it).
2014-12-18 00:09:25 +00:00
JP Smith
ddfdb2ee78 renamed <#> to prevent naming conflict 2014-12-16 17:20:10 -06:00
JP Smith
b9de91b15f added subclasses for Arrow 2014-12-16 17:01:05 -06:00
JP Smith
517dad9e8a added default definitions for second, ***, &&& 2014-12-15 10:40:51 -06:00
Edwin Brady
4108ad3aee Update CHANGELOG 2014-12-15 00:42:48 +00:00
Edwin Brady
941ba6eacb Implemented @-patterns
By popular request. Fixes #1706.

It's not the most efficient desugaring, merely translating the @s on the
left to lets on the right, so the case tree builder won't be aware of
it. Still, it provides the notation and it works nicely with showing
what is in scope and what is available in the prover and so on.
2014-12-15 00:09:56 +00:00
Edwin Brady
3c19722dc1 Merge pull request #1749 from alexander-b/fix-build
Output: Use throwError from Control.Monad.Except
2014-12-14 23:29:57 +00:00
Heather
d20e863926 remove /examples/ folder, move Makefile to /samples/ 2014-12-13 23:50:03 +04:00
Edwin Brady
ec7a6a72c1 Fix doc build 2014-12-13 18:26:28 +00:00
Edwin Brady
51febe053e Update CHANGELOG 2014-12-13 17:45:12 +00:00
Edwin Brady
94074a9835 Merge branch 'master' of github.com:idris-lang/Idris-dev 2014-12-13 17:43:46 +00:00
Edwin Brady
7b5f4aa392 Fix visibility of imported things
Fixes #111
Previously, if a module B imports a module A, then a module C imports B,
the public names in A would also be visible to C (i.e. B would
automatically reexport everything from A). This seems to be a bad
default.

This patch changes the default behaviour so that the only names exported
from a module are those defined in that module. If B imports A and wants
to reexport everything in A, then A should be imported with the "public"
modifier (i.e. "import public A").

Several changes have been made to the prelude, since several prelude
modules were taking advantage of the old broken behaviour.

This may cause lots of things to break. Sorry. The fix is typically just
to import the module you should have imported anyway :).
2014-12-13 17:40:37 +00:00
raichoo
e6dcf41ffd Merge pull request #1785 from raichoo/master
javascript
2014-12-13 14:44:24 +01:00
raichoo
d176363424 updated CHANGELOG 2014-12-13 14:33:33 +01:00
raichoo
ba01be351f added optimizations to js/node cabal section 2014-12-13 14:17:15 +01:00
raichoo
e8549627b1 javascript: better unicode support 2014-12-13 14:14:46 +01:00
Edwin Brady
b9e5895f94 Merge pull request #1782 from mietek/master
Work around bug in glibc 2.11
2014-12-11 23:29:09 +00:00
David Christiansen
853c9c56ed Merge pull request #1783 from jfdm/contrib/updates
Updates to idrislang.sty
2014-12-11 08:06:29 -08:00
Edwin Brady
674eb4ca62 Support for inductive-inductive types
Add constructors to context immediately after elaborating, rather than
adding the whole data type at once, so that later constructors can use
them. Fixes #1757.
2014-12-10 13:40:46 +00:00
Edwin Brady
8cbdc835bd Look in binders when building size change graph
Fixes #1781
2014-12-10 12:33:51 +00:00
Jan de Muijnck-Hughes
64f9d19ca8 Several updates to idrislang.sty
+ Removal of numbers package option. Listing styles must be set either globally using `\lstset{}` or per code or listings environment options.
+ Addition of a beamer style.
+ Inclusion of the `:pprint` LaTeX formatting commands. No more need to copy everything from the result of `:pprint`, just the code snippet.
  + command chars for fancy verbatim has been set globally.
+ Option to change spacing command, useful for cases where line spacing is changed via different commands. For example: memoir has `\SingleSpacing`, setspace has `\singlespacing`.
2014-12-10 00:25:22 +00:00
Miëtek Bak
f744f1c1dd Work around bug in glibc 2.11 2014-12-09 23:52:54 +00:00
Jan de Muijnck-Hughes
8698e57b04 Updates to idrislang.sty 2014-12-09 23:38:55 +00:00
Edwin Brady
12c7a1b57a Remove -Werror in Output.hs due to ErrorT
As far as I can tell, we can't replace ErrorT with ExceptT yet because
there's a missing MonadException instance in Haskeline. Also, the
dependencies we have set are causing a build failure on travis due to
the -Werror.

Proper fixes welcome! This is noted in issue #1780
2014-12-09 20:58:33 +00:00
Edwin Brady
e34c6df87d Add proper namespace to class instances
Fixes #1779
2014-12-09 17:27:36 +00:00