Commit Graph

141 Commits

Author SHA1 Message Date
Edwin Brady
3f914889b8 Add visibility rules on types
Can't export a type which refers to a private name. This has caught a
couple of visibility errors in the libraries, code and tests, so they've
been updated too.
2020-05-30 17:03:15 +01:00
Edwin Brady
2b08a9df0f
Merge pull request #199 from karroffel/console-api
added more functions to Control.App.Console
2020-05-30 12:42:47 +01:00
Thomas Herzog
e39477aa0e added more functions to Control.App.Console
Now all common console IO functions available from the
prelude are available through the `Control.App.Console`
interface.

Added:
- putChar
- getChar
- getCharLn
- print
- printLn

Renamed:
- getStr to getLine
2020-05-30 12:44:40 +02:00
Edwin Brady
e1dbcad2fc Make a start on reflection
Don't get too excited yet - I want this in so that it doesn't get too
out of sync, but I still have to think about exactly how it's going to
work in practice.
2020-05-29 22:40:29 +01:00
Edwin Brady
d869eb666c Experiment %syntactic flag on with
This means it abstracts over the value syntactically, rather than by
value, and can significantly speed up elaboration where large types are
involved, at a cost of being less general. Try it if "with" is slow.

There are more flags we want on with (well, at least one: "proof")
2020-05-29 16:39:11 +01:00
Tim Süberkrüb
46f7b78b0e Try to fix pclose for Windows
Co-authored-by: Niklas Larsson <metaniklas@gmail.com>
2020-05-28 16:12:26 +02:00
Tim Süberkrüb
c2dfe7de7f Add popen and pclose from Idris 1 2020-05-28 12:58:03 +02:00
Niklas Larsson
696db7f58f
Merge pull request #169 from andylokandy/pathcom
Use Path in the compiler
2020-05-27 21:23:29 +02:00
Edwin Brady
c88bf7af8d Fix import loading
This was taking too long, and adding too many things, because it was
going too deep in the name of having everything accessible at the REPL
and for the compiler. So, it's done a bit differently now, only chasing
everything on a "full" load (i.e., final load at the REPL)

This has some effects:
+ As systems get bigger, load time gets better (on my machine, checking
  Idris.Main now takes 52s from scratch, down from 76s)
+ You might find import errors that you didn't previously get, because
  things were being imported that shouldn't have been. The new way is
  correct!

An unfortunate effect is that sometimes you end up getting "undefined
name" errors even if you didn't explicitly use the name, because
sometimes a module uses a name from another module in a type, which then
gets exported, and eventually needs to be reduced. This mostly happens
because there is a compile time check that should be done which I
haven't implemented yet. That is, public export definitions should only
be allowed to use names that are also public export. I'll get to this
soon.
2020-05-27 15:49:03 +01:00
andylokandy
e8b1d54e0a Refactor Core.Directory 2020-05-27 18:21:40 +08:00
andylokandy
40401b53ec Remove the duplicate isWindows 2020-05-27 03:12:54 +08:00
andylokandy
712a4df140 Gather the straw isWindowss 2020-05-26 17:59:14 +08:00
Edwin Brady
087cb84dda
Merge pull request #130 from clayrat/list-quantifiers
add Data.List.Quantifiers
2020-05-25 11:57:08 +01:00
Alex Gryzlov
eb04046b43 inline removed anyElim, refactor more 2020-05-25 03:53:29 +02:00
Alex Gryzlov
5757c5e5cb remove anyElim 2020-05-25 02:27:19 +02:00
Edwin Brady
1ea54e764b
Merge pull request #144 from idris-lang/coverage
%default covering
2020-05-24 20:42:08 +01:00
Edwin Brady
498421a236 All functions now need to be covering by default
This has caught a couple of things in the Idris 2 code base itself. Some
tests needed partial annotations too.
2020-05-24 19:58:20 +01:00
Edwin Brady
3ec8631480 More coverage checking fixes
Still a couple of things to resolve in coverage and totality checking
before we can switch on %default, so don't expect quite the right
behaviour just yet. More progress though!

Also working on this has caught a few totality errors in the Idris 2
code base that Idris 1 missed... so these are fixed on the way.
2020-05-24 18:33:43 +01:00
Kamil Shakirov
80344b5435 Merge branch 'master' into better-names 2020-05-24 07:59:25 +06:00
Alex Gryzlov
4aede51098 fix typos 2020-05-24 03:18:15 +02:00
Alex Gryzlov
a312409e19 add Data.List.Quantifiers 2020-05-24 03:15:38 +02:00
Edwin Brady
ad9a2a187f Fix Char casting
For the same behaviour as Idris 1, the primitive cast should return 0 if
the integer is out of bounds. (We should probably drop the Cast
implementation though, since ideally they won't be lossy in general, but
that's an issue for another time...)

All the tests pass in racket now, for me.
2020-05-23 22:19:10 +01:00
Edwin Brady
cff5fc2625 Workaround for byte vectors in Racket
Racket appears to have a different notion of current directory than the
system does, so we need to tell it which directory we think we're in
when reading and writing bytevectors using the scheme file functions.
2020-05-23 21:37:31 +01:00
Kamil Shakirov
e61e44205b Merge branch 'master' into better-names 2020-05-24 00:26:52 +06:00
Tim Süberkrüb
5dde7063f8 Add popen and pclose from Idris 1 2020-05-23 18:42:05 +02:00
Matthieu JACQUOT
f84850ea36 add minus proofs on Nats from Idris1 2020-05-22 22:39:09 +02:00
Kamil Shakirov
f696335f2d Rename some file/dir manipulation functions
Renamed:

fileRemove -> removeFile

dirOpen -> openDir
dirClose -> closeDir
rmDir -> removeDir
2020-05-21 18:32:35 +06:00
Kamil Shakirov
806c993d99 Move System.Clock from 'contrib' to 'base' 2020-05-21 17:00:09 +06:00
Edwin Brady
215ad99308
Merge pull request #86 from andylokandy/just
Add a total version of the fromMaybe
2020-05-20 21:41:35 +01:00
andylokandy
a51a665668 Reuse foldr1 in foldr1' 2020-05-21 02:35:18 +08:00
andylokandy
5252a7ae3b Add a total version of the fromMaybe 2020-05-21 02:11:35 +08:00
andylokandy
8de668f1a4 Add folds without default value to List 2020-05-21 02:09:14 +08:00
andylokandy
0d82b5d7da Add System.Path 2020-05-20 22:51:01 +08:00
Edwin Brady
2569b6e991 Update libraries from upstream 2020-05-19 17:03:18 +01:00
Kamil Shakirov
b801b97fcc Refactor makefiles 2020-05-19 18:50:47 +06:00
Edwin Brady
6bbb914fca
Merge pull request #1 from edwinb/remove-directory-system
Add rmDir to System.Directory
2020-05-19 12:24:35 +01:00
Edwin Brady
ede324dc6c Don't collapse empty lines in 'lines'
Now the vim mode works!
2020-05-19 10:47:05 +01:00
André Videla
3321dc6be3 Add rmDir to System.Directory 2020-05-18 18:28:33 +01:00
Edwin Brady
4125b76e90 Add Reflection to base 2020-05-18 16:57:43 +01:00
Edwin Brady
f7b285ec6c Add paths for install
Also remove libraries we aren't using quite yet...
2020-05-18 16:29:18 +01:00
Edwin Brady
dec7dff622 Add libraries 2020-05-18 14:00:08 +01:00