Skip to content

Commit ea1ad16

Browse files
authored
Merge pull request #1599 from edwinb/prepare-040
Changes for next release, 0.4.0
2 parents 5689786 + 0010773 commit ea1ad16

File tree

23 files changed

+10704
-12772
lines changed

23 files changed

+10704
-12772
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## Unreleased (idris2-next)
3+
## v0.4.0
44

55
### Syntax changes
66

@@ -52,6 +52,9 @@
5252
* Added `:search` command, which searches for functions by type
5353
* `:load`/`:l` and `:cd` commands now only accept paths surrounded by double
5454
quotes
55+
* Added a timeout to "generate definition" and "proof search" commands,
56+
defaulting to 1 second (1000 milliseconds) and configurable with
57+
`%search_timeout <time in milliseconds>`
5558

5659
### Library Changes
5760

@@ -165,6 +168,9 @@ Added
165168

166169
### Other changes
167170

171+
* Lots of small performance improvements, some of which may be especially
172+
noticeable in programs that do a lot of type level evaluation.
173+
* Added HTML documentation generation, using the `--mkdoc` flag
168174
* Support for auto-completion in bash-like shells was added.
169175
* Fixed case-splitting to respect any indentation there may be in the term being
170176
case-split and the surrounding symbols, instead of filtering out the

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TARGETDIR = ${CURDIR}/build/exec
99
TARGET = ${TARGETDIR}/${NAME}
1010

1111
MAJOR=0
12-
MINOR=3
12+
MINOR=4
1313
PATCH=0
1414

1515
GIT_SHA1=

Release/CHECKLIST

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[ ] Change version number (MAJOR, MINOR, PATCH) in Makefile
22
[ ] Change version numbers in doc listings
33
[ ] Change version numbers in prelude, base, contrib, network, and test ipkgs
4+
[ ] Change version number in idris2api.ipkg
5+
[ ] Change version number in flake.nix
6+
[ ] Change version number in test pkg010 (TODO: make this step unnecessary!)
47
[ ] Update bootstrap chez and racket
58
[ ] Tag on github with version number (in the form vX.Y.Z)
69
[ ] make libdocs and upload to idris-lang.org

bootstrap/idris2_app/idris2.rkt

Lines changed: 5315 additions & 6362 deletions
Large diffs are not rendered by default.

bootstrap/idris2_app/idris2.ss

Lines changed: 5346 additions & 6392 deletions
Large diffs are not rendered by default.

docs/source/listing/idris-prompt-helloworld.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$ idris2 hello.idr
22
____ __ _ ___
33
/ _/___/ /____(_)____ |__ \
4-
/ // __ / ___/ / ___/ __/ / Version 0.3.0
4+
/ // __ / ___/ / ___/ __/ / Version 0.4.0
55
_/ // /_/ / / / (__ ) / __/ https://www.idris-lang.org
66
/___/\__,_/_/ /_/____/ /____/ Type :? for help
77

docs/source/listing/idris-prompt-interp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$ idris2 interp.idr
22
____ __ _ ___
33
/ _/___/ /____(_)____ |__ \
4-
/ // __ / ___/ / ___/ __/ / Version 0.3.0
4+
/ // __ / ___/ / ___/ __/ / Version 0.4.0
55
_/ // /_/ / / / (__ ) / __/ https://www.idris-lang.org
66
/___/\__,_/_/ /_/____/ /____/ Type :? for help
77

docs/source/listing/idris-prompt-start.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$ idris2
22
____ __ _ ___
33
/ _/___/ /____(_)____ |__ \
4-
/ // __ / ___/ / ___/ __/ / Version 0.3.0
4+
/ // __ / ___/ / ___/ __/ / Version 0.4.0
55
_/ // /_/ / / / (__ ) / __/ https://www.idris-lang.org
66
/___/\__,_/_/ /_/____/ /____/ Type :? for help
77

docs/source/reference/packages.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ Given an Idris package file ``test.ipkg`` it can be used with the Idris compiler
130130

131131
+ ``idris2 --clean test.ipkg`` will clean the intermediate build files.
132132

133+
+ ``idris2 --mkdoc test.ipkg`` will generate HTML documentation for the
134+
package, output to ``build/docs``
135+
133136
Once the test package has been installed, the command line option
134137
``--package test`` makes it accessible (abbreviated to ``-p test``).
135138
For example::

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
};
99

1010
outputs = { self, nixpkgs, flake-utils, idris-emacs-src }:
11-
let idris2-version = "0.3.0";
11+
let idris2-version = "0.4.0";
1212
in flake-utils.lib.eachDefaultSystem (system:
1313
let pkgs = import nixpkgs { inherit system; };
1414
idris2Pkg = pkgs.callPackage ./nix/package.nix { inherit idris2-version; };

idris2api.ipkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package idris2
2-
version = 0.3.0
2+
version = 0.4.0
33

44
modules =
55
Algebra,

libs/base/Data/Buffer.idr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ prim__newBuffer : Int -> PrimIO Buffer
3434
export
3535
newBuffer : HasIO io => Int -> io (Maybe Buffer)
3636
newBuffer size
37-
= do buf <- primIO (prim__newBuffer size)
38-
pure $ Just buf
37+
= if size >= 0
38+
then do buf <- primIO (prim__newBuffer size)
39+
pure $ Just buf
40+
else pure Nothing
3941
-- if prim__nullAnyPtr buf /= 0
4042
-- then pure Nothing
4143
-- else pure $ Just $ MkBuffer buf size 0

libs/base/base.ipkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package base
2-
version = 0.3.0
2+
version = 0.4.0
33

44
opts = "--ignore-missing-ipkg -Wno-shadowing"
55

libs/contrib/contrib.ipkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package contrib
2-
version = 0.3.0
2+
version = 0.4.0
33

44
opts = "--ignore-missing-ipkg -Wno-shadowing"
55

libs/network/network.ipkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package network
2-
version = 0.3.0
2+
version = 0.4.0
33

44
opts = "--ignore-missing-ipkg -p contrib"
55

libs/prelude/prelude.ipkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package prelude
2-
version = 0.3.0
2+
version = 0.4.0
33

44
opts = "--ignore-missing-ipkg --no-prelude"
55

libs/test/test.ipkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package test
2-
version = 0.3.0
2+
version = 0.4.0
33

44
depends = contrib
55

src/Libraries/Utils/Binary.idr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ TTC String where
222222
fromBuf b
223223
= do len <- fromBuf {a = Int} b
224224
chunk <- get Bin
225+
when (len < 0) $ corrupt "String"
225226
if toRead chunk >= len
226227
then
227228
do val <- coreLift $ getString (buf chunk) (loc chunk) len
@@ -252,7 +253,7 @@ TTC Binary where
252253
if toRead chunk >= len
253254
then
254255
do Just newbuf <- coreLift $ newBuffer len
255-
| Nothing => throw (InternalError "Can't create buffer")
256+
| Nothing => corrupt "Binary"
256257
coreLift $ copyData (buf chunk) (loc chunk) len
257258
newbuf 0
258259
put Bin (incLoc len chunk)

tests/Main.idr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ idrisTestsRegression = MkTestPool "Various regressions" [] Nothing
123123
"reg015", "reg016", "reg017", "reg018", "reg019", "reg020", "reg021",
124124
"reg022", "reg023", "reg024", "reg025", "reg026", "reg027", "reg028",
125125
"reg029", "reg030", "reg031", "reg032", "reg033", "reg034", "reg035",
126-
"reg036", "reg037", "reg038", "reg039", "reg040", "reg041", "reg042"]
126+
"reg036", "reg037", "reg038", "reg039", "reg040", "reg041", "reg042",
127+
"reg043"]
127128

128129
idrisTestsData : TestPool
129130
idrisTestsData = MkTestPool "Data and record types" [] Nothing

tests/idris2/pkg010/expected.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
1/1: Building Main (Main.idr)
2-
Installing __PWD__build/ttc/Main.ttc to __PWD__currently/nonexistent/dir/idris2-0.3.0/testpkg-0
3-
Installing __PWD__build/ttc/Main.ttc to __PWD__currently/nonexistent/dir/idris2-0.3.0/testpkg-0
2+
Installing __PWD__build/ttc/Main.ttc to __PWD__currently/nonexistent/dir/idris2-0.4.0/testpkg-0
3+
Installing __PWD__build/ttc/Main.ttc to __PWD__currently/nonexistent/dir/idris2-0.4.0/testpkg-0

tests/idris2/reg043/TestFake.idr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import Fake

tests/idris2/reg043/expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1/1: Building TestFake (TestFake.idr)
2+
Error: Error in TTC file: Corrupt TTC data for String (the most likely case is that the ./build directory in your current project contains files from a previous build of idris2 or the idris2 executable is from a different build than the installed .ttc files)

tests/idris2/reg043/run

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mkdir -p build/ttc
2+
echo "TT2This Is A Fake TTC" > build/ttc/Fake.ttc
3+
4+
$1 --no-color --console-width 0 --check TestFake.idr
5+
6+
rm -rf build

0 commit comments

Comments
 (0)