Commit Graph

5127 Commits

Author SHA1 Message Date
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
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
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
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
Edwin Brady
fbcd64372b Check datatypes are not redefined
We were checking, but only seeing if the type constructor was the same,
which is not enough. Fixes #1776.
2014-12-09 15:38:26 +00:00
Edwin Brady
58dd2b50d7 Move Pair/Sigma into Builtins namespace
Fixes #1775 (but there is still a related problem to address too,
being #1776)
2014-12-09 15:14:50 +00:00
Edwin Brady
c943361c35 Remove Type* on type of (.)
We should leave this sort of thing until uniqueness types are more
mature and we've experimented more outside the Prelude.
Fixes #1777
2014-12-09 13:54:21 +00:00
Edwin Brady
713776cc21 Check for cycles in unification results
Fixes #1754.
2014-12-09 13:43:22 +00:00
Edwin Brady
2c3928683c Fix for name clashes when applying transformations
Fixes #1684, and most likely a lot of other partial evaluation problems.
IBC version updated since the problem may show up in any library code
that's currently built.
2014-12-09 12:46:53 +00:00
Edwin Brady
f01c1a1d19 Efficiency of unification
Unification is trying to hard to unify things which are never going to
work, and backtracking a lot. This stops that.
Fixes #1219
2014-12-08 12:51:03 +00:00
Edwin Brady
6b134748e5 Merge pull request #1773 from JakobBruenker/master
Added ":refine" to the autocompletions in the REPL
2014-12-08 12:50:48 +00:00
Edwin Brady
934bc0b56b Merge pull request #1770 from jfdm/fix/lift-todo-completion
Lifted TODO/FIXME issues to the issue tracker for Completion.hs
2014-12-08 12:50:35 +00:00
Edwin Brady
f2d752a181 Merge pull request #1762 from bmsherman/improveParserErrors2
Improve parser errors in dependent type signatures
2014-12-08 12:47:43 +00:00
raichoo
2e645e2ed9 Merge pull request #1774 from raichoo/master
added IOExcept handler to FileIO effect
2014-12-07 21:16:25 +01:00
raichoo
9ec6a5ad8c added IOExcept handler to FileIO effect 2014-12-07 17:50:40 +01:00
Jakob Brünker
b12b10f796 added ":refine", ":ref", "refine!" and "ref!" to the autocompletions in the REPL 2014-12-07 02:28:59 +01:00
Edwin Brady
d60c85e12c Add a default case for addShows
The assumption that the argument lists are equal in length is a flawed
one. Fixes #1765
2014-12-05 20:14:25 +00:00
Edwin Brady
6b6aae0bd8 Avoid retrying unification problems constantly
If solved metavariables do nothing to a unification problem, there's no
point in trying it again - this can lead to a massive slowdown if
there's a lot of evaluation in the type. Partially addresses #1219.

Fixes #1716 on the way by tidying up type of updateProblems.
2014-12-05 19:38:29 +00:00
Jan de Muijnck-Hughes
36e304de34 Lifted TODO/FIXME issues to the issue tracker. 2014-12-05 15:55:11 +00:00
Edwin Brady
bcd2db1b81 Check target of 'with' is a value (not a function) 2014-12-04 21:51:54 +00:00
Edwin Brady
ec17e6adbf Merge pull request #1763 from ziman/show-vect
Define `Show` instance for `Vect` via `toList`
2014-12-04 19:19:04 +00:00
Edwin Brady
c44a35c492 Merge pull request #1761 from bmsherman/dontDupErrors
Reduce redundant 'specifically' clauses in errors
2014-12-04 19:18:08 +00:00
Edwin Brady
6f032cc1b5 Merge pull request #1755 from mattias-lundell/master
Make tests work with sandboxes and fix GC statistics overflow
2014-12-04 19:17:24 +00:00
Edwin Brady
e452845709 Merge pull request #1712 from Melvar/remove-impossible
Remove a no longer necessary `impossible`
2014-12-04 19:16:02 +00:00
Matus Tejiscak
64a6ceb23c Define Show instance for Vect via toList. 2014-12-04 16:49:09 +00:00
Edwin Brady
7afa03a8b7 Need to resolve autos in each 'try' branch
If the branch solves an implicit which makes the auto solvable, we need
to try to resolve it straight away so we know whether the branch is
valid or not. We need this especially when using 'try' to implement
implicit coercions.
2014-12-04 14:39:20 +00:00