Previous week Up Next week

Hello

Here is the latest Caml Weekly News, for the week of August 28 to September 04, 2012.

  1. xtmpl 0.2 and stog 0.2
  2. Mascot 1.0 release
  3. Kaputt 1.2 release
  4. JoCaml 4.00.0 release
  5. ocaml-lua v1.0: OCaml binding of Lua library
  6. PROMELA library 0.4
  7. ocaml-4.00.0 compilation problem with first class modules and optional parameters
  8. hevea 2.00
  9. Other Caml News

xtmpl 0.2 and stog 0.2

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-08/msg00154.html

Maxence Guesdon announced:
I'm happy to announce Xtmpl 0.2 is available from
http://zoggy.github.com/xtmpl
Xtmpl is a rewrite engine / templating library for Xml trees. This release
includes only minor changes.

I'm even happier to announce Stog 0.2, available from
http://zoggy.github.com/stog/install.html

Stog is a static multi-lingual web site and blog generator.
A lot of changes in this release, including: Processed files are now only
XML (no ad hoc format any more). The system is more flexible, more
convenient also. Documentation was updated accordingly.
      

Mascot 1.0 release

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-08/msg00157.html

Xavier Clerc announced:
This post announces the 1.0 release of the Mascot project, whose goal is to
provide a style-checker for OCaml sources.

Home page: http://mascot.x9c.fr

Main changes since 1.0-beta:
- support for checks based on binary annotations
- support for binary output mode, and report-only mode
- new code check: 'catch_all' to detect patterns catching all
exceptions
- new code check: 'code.ignore_unit' check to detect application of
'ignore' to expression whose type is 'unit'
- bug #72: allow punctuation after closing a block
- bug #74: handle the '::' operator
- bug #75: do not require whitespace after '?' used for optional label
- bug #76: do not require whitespace around '..' used for character
range
- bug #77: allow absence of whitespace before unary minus if previous
token is an opening one
- bug #79: treat '[< ... >]' and '[| ... |]' blocks like '{ ... }'
blocks
- bug #80: allow whitespace after '.' when used to introduce
polymorphic type
- bug #81: allow opening token after a label
- bug #84: use 'center' rather than 'p' tag with 'align' attribute,
and correct handling of icons
- bug #87: install shouldn't build anything
- bug #89: do not activate warnings by default
- bug #90: output available checks as a ready-to-use config
- bug #93: 'interface.duplicate' to detect duplicate entries in
signatures
- bug #94: do not require whitespace after colon
- bug #96: 'typography.trailing_white_space' now has a 'tolerance'
parameter in order to indicate how many whitespace characters may be
tolerated
- update for OCaml 4.00.0
      

Kaputt 1.2 release

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-08/msg00156.html

Xavier Clerc announced:
This post announces the 1.2 release of the Kaputt project, whose goal is to
provide a comprehensive testing framework for the OCaml language.

Home page: http://kaputt.x9c.fr

Main changes since 1.1:
- new 'Mock' module providing means of recording calls made to a function
- support for specification of partial functions (i. e. raising exceptions)
- preprocessor allowing to store tests in separated '.mlt' files
- removed deprecated functions
- update for OCaml 4.00.0
- bug#85: cmi file is not installed
- bugfixes to bigarray and nums support
      

JoCaml 4.00.0 release

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-08/msg00163.html

Luc Maranget announced:
It is my pleasure to announce the new release (4.00.0) of JoCaml.

JoCaml is the concurrrent and distributed extension of OCaml based upon
the join-caculus.

The new release follows OCaml evolution, it may be that the integration
of OCaml new features such as GADT and binary annotations is far
from perfect...


The new release is available from JoCaml web site:
http://jocaml.inria.fr/
      

ocaml-lua v1.0: OCaml binding of Lua library

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-09/msg00000.html

Paolo Donadeo announced:
I'm happy to announce the first release of ocaml-lua, the OCaml
binding of the Lua library. With ocaml-lua you can embed a Lua
interpreter in an OCaml program in a few lines of code, and use Lua
for configuration or customization purposes.

Here are some references:

The homepage of the project is hosted on OCaml Forge:
http://ocaml-lua.forge.ocamlcore.org/
The complete library reference (ocamldoc generated) is here:
http://ocaml-lua.forge.ocamlcore.org/api-lua/
Source tarballs are on the download page on OCaml Forge:
http://forge.ocamlcore.org/frs/?group_id=167
The official GIT repository is here:
http://forge.ocamlcore.org/scm/browser.php?group_id=167
Bug reports and feature requests are on my page on GitHub:
https://github.com/pdonadeo/ocaml-lua/issues
      

PROMELA library 0.4

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-09/msg00001.html

Markus Weissmann announced:
I'd like to announce version 0.4 of the PROMELA library. It provides types
and functions to create, analyze and modify PROMELA programs as used by the
Spin model checker.
The source code is available on ocamlforge under the new bsd license:

http://promela.forge.ocamlcore.org/

The purpose of the library is to make automated generation, rewriting and
verification of PROMELA models easy. Think of it as something like "LLVM for
model checking".
It comes with an example generator that can create a model of an
arbitrary-sized dining philosophers problem.
      

ocaml-4.00.0 compilation problem with first class modules and optional parameters

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-09/msg00003.html

Jacques-Pascal Deplaix asked and Jacques Garrigue explained:
> I have met some compilation problem when I tried to compile ocsimore
> with ocaml-4.00.0:
>
> Error: This expression has type
> ?href_action:Wiki_syntax_types.link_action ->
> ?link_action:Wiki_syntax_types.link_action ->
> Wiki_syntax_types.desugar_param -> string -> string Lwt.t
> but an expression was expected of type
> Wiki_syntax_types.desugar_param -> string -> string Lwt.t
>
> It's really a weird error. I tried to reproduce it in a small test-case
> but I didn't succeed.
>
> I made a patch for it in ocsimore, but it's really dirty/useless:
> http://ocsigen.org/darcsweb/?r=ocsimore;a=commitdiff;h=20120903152205-a85e5-00b22d6e2abc7c666a7700d70e3190e6aefbfd7e.gz
>
> If someone can tell me if it's an ocaml bug or something else.

OCaml 4.00 is much more agressive in propagating expected types when
typing expressions. Unfortunately, there was a conflict between this
upward propagation, and the somehow adhoc behaviour which removes
optional arguments from a function passed as argument to a function or
record/variant constructor not expecting optional arguments.

Specifically, this is this behavior:

val f : (unit -> unit) -> unit
val g : ?x:int -> ?y:bool -> unit -> unit

let () = f g

This code triggers automatic discarding of the optional arguments of g,
so that the type matches the expected one.

But for this we need to first infer the type of the argument, to see that
it doesn't match the expected one.

I was not aware that this feature was widely used, and the behavior in 4.00.0
is to restrict this feature to expressions where upward propagation doesn't
make sense anyway:
* identifiers
* function applications
* message sending
* record field extraction
* wrapping of "let open" around any of those

Since "let module" is not included, this breaks the code in ocsimore...

This is actually the same problem as reported in
http://caml.inria.fr/mantis/view.php?id=5748

The clean fix in your case is to move the "let module" outside of the
application:

let module Plugin = (val p: WikiPlugin) in desugar_content (desugar_string
Plugin.wikiparser)

If you don't care about compatibility with 3.12, you can even write:

| WikiPlugin (module Plugin) ->
desugar_content (desugar_string Plugin.wikiparser)


I'm pondering what to do about this. Since this feature is described
in the tutorial part of the reference manual, I suppose this qualifies
as a bug. However, combining this behavior with upward propagation is
difficult.

Not propagating types to function arguments seems fine, but for
variant and record constructors this is less clear-cut. Another option
is to extend the syntactic cases where the behavior is triggered,
including "let" and "let module", but the above PR#5748 is about
inlined functions, which could benefit from propagation.
      

hevea 2.00

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-09/msg00010.html

Luc Maranget announced:
It is my pleasure to announce the new, 2.00 release of HEVEA.

HEVEA is a LaTeX to HTML translator. The input language is a
fairly complete subset of LaTeX2e and the output
language is HTML that is (hopefully) correct with respect to
version 5.

HEVEA web page is http://hevea.inria.fr/

This release is a major one as hevea output has changed from
HTML 4.00 (transitional) to HTML version 5.
      

Other Caml News

From the ocamlcore planet blog:
Thanks to Alp Mestan, we now include in the Caml Weekly News the links to the
recent posts from the ocamlcore planet blog at http://planet.ocamlcore.org/.

A safe but strange way of modifying OCaml compiler:
  http://camlspotter.blogspot.com/2012/09/a-safe-but-strange-way-of-modifying.html

First release of OCaml binding of Lua library:
  https://forge.ocamlcore.org/forum/forum.php?forum_id=855

First release of OCaml binding of Lua library:
  http://www.donadeo.net/post/2012/first-release-of-ocaml-lua

OCaml-R:
  https://forge.ocamlcore.org/projects/ocaml-r/

Kaputt 1.2:
  https://forge.ocamlcore.org/forum/forum.php?forum_id=854

JoCaml 4.00:
  http://caml.inria.fr/cgi-bin/hump.cgi?contrib=247

Mascot 1.0:
  http://caml.inria.fr/cgi-bin/hump.cgi?contrib=755
      

Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.


Alan Schmitt