Skip to content

Commit

Permalink
Merge pull request #271 from avsm/rel-2.3.0
Browse files Browse the repository at this point in the history
Prepare release 2.3.0
  • Loading branch information
avsm authored Jan 31, 2019
2 parents 4e9b9d1 + 2a711a7 commit 0b631b4
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_build/
.merlin
*.install
*.elc
*.elc
.*.swp
32 changes: 28 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
dev
---
2.3.0 (2019-01-31)
------------------

The new feature in this release is to automatically install
printers marked with `[@@ocaml.toplevel_printer]` (#269 @diml).
Adding this annotation to your libraries will remove the need
to have a separate `top` package to install the printers.

For example, in the [uri](https://github.com/mirage/ocaml-uri)
library, the old printing function for `Uri.t` was:

```
val pp_hum : Format.formatter -> t -> unit
```

Just adding this annotation results in `Uri.t` values being automatically
pretty printed in this version of utop.

```
val pp_hum : Format.formatter -> t -> unit [@@ocaml.toplevel_printer]
```

* Port build to dune from jbuilder (@avsm)
* Upgrade local opam metadata to opam 2.0 format (@avsm)
* Add cool screenshot to README (#259 @rizo) and update links (#257 @bobot)
* Improve robustness by using more tail-recursive functions (#251 @gpetiot)
* Remove deprecation warnings in newer compilers (#246 @ncihnegn)
* Minimum OCaml version supported is now 4.03.0 (#254 @XVilka)
* Publish API documentation online and add `doc:` entry to opam file (#270 @avsm)
* Port build to dune from jbuilder (#268 @avsm)
* Upgrade local opam metadata to opam 2.0 format (#268 @avsm)

2.2.0 (2018-07-15)
------------------
Expand Down
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,3 @@ cinaps:
clean:
rm -rf _build *.install
find . -name .merlin -delete

# This needs to be updated
.PHONY: gh-pages
gh-pages: doc
git clone `git config --get remote.origin.url` .gh-pages --reference .
git -C .gh-pages checkout --orphan gh-pages
git -C .gh-pages reset
git -C .gh-pages clean -dxf
cp -t .gh-pages/ _build/utop-api.docdir/*
git -C .gh-pages add .
git -C .gh-pages commit -m "Update Pages"
git -C .gh-pages push origin gh-pages -f
rm -rf .gh-pages
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,34 @@ correctly:

It shall point to the directory `stublibs` inside your ocaml installation.

Automatically installing toplevel printers
------------------------------------------

Utop will automatically install toplevel printers for custom
types if their interface file is marked with an
`[@@ocaml.toplevel_printer]` attribute. Adding this annotation to
your libraries will remove the need to have a separate `top` package
to install the printers.

For example, in the [uri](https://github.com/mirage/ocaml-uri)
library, the old printing function for `Uri.t` was:

```
val pp_hum : Format.formatter -> t -> unit
```

Just adding this annotation results in `Uri.t` values being automatically
pretty printed in this version of utop.

```
val pp_hum : Format.formatter -> t -> unit [@@ocaml.toplevel_printer]
```

There should be no downsides to adding this attribute to your
libraries, so we encourage community library maintainers to
use this attribute to improve the out-of-the-box experience
for users of their libraries within utop.

Creating a custom utop-enabled toplevel
---------------------------------------

Expand Down
1 change: 1 addition & 0 deletions utop.opam
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors: "Jérémie Dimino"
license: "BSD3"
homepage: "https://github.com/ocaml-community/utop"
bug-reports: "https://github.com/ocaml-community/utop/issues"
doc: "https://ocaml-community.github.io/utop/"
depends: [
"ocaml" {>= "4.03.0"}
"base-unix"
Expand Down

0 comments on commit 0b631b4

Please sign in to comment.