<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ocaml.git/stdlib/format.ml, branch flambda_trunk</title>
<subtitle>github.com: ocaml/ocaml
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/'/>
<entry>
<title>Merge pull request #267 from yallop/faster-ifprintf</title>
<updated>2015-10-31T15:54:40+00:00</updated>
<author>
<name>Gabriel Scherer</name>
<email>gabriel.scherer@gmail.com</email>
</author>
<published>2015-10-31T15:54:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=b2e81d78008942cee997ac229cc06d329d600a5c'/>
<id>b2e81d78008942cee997ac229cc06d329d600a5c</id>
<content type='text'>
A more efficient implementation of ifprintf</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A more efficient implementation of ifprintf</pre>
</div>
</content>
</entry>
<entry>
<title>Code cleanup: replace let-binding of type unit with sequence.</title>
<updated>2015-10-27T10:28:36+00:00</updated>
<author>
<name>alainfrisch</name>
<email>alain@frisch.fr</email>
</author>
<published>2015-10-27T10:28:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=a127e661b2020559f56133414fb43c1b7b81dbe7'/>
<id>a127e661b2020559f56133414fb43c1b7b81dbe7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use make_iprintf to build Format.ikfprintf and Format.ifprintf.</title>
<updated>2015-10-27T00:02:45+00:00</updated>
<author>
<name>Jeremy Yallop</name>
<email>yallop@gmail.com</email>
</author>
<published>2015-10-19T11:01:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=19301282d5e70a391f95543f0c41122e0fcbd34d'/>
<id>19301282d5e70a391f95543f0c41122e0fcbd34d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Renaming: flush_buf_formatter into flush_buffer_formatter.</title>
<updated>2015-09-21T17:08:11+00:00</updated>
<author>
<name>Pierre Weis</name>
<email>Pierre.Weis@inria.fr</email>
</author>
<published>2015-09-21T17:08:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=e02d472aa4a67b55e8380e922421f8e9c5211fd7'/>
<id>e02d472aa4a67b55e8380e922421f8e9c5211fd7</id>
<content type='text'>
flush_str_formatter rewritten using flush_buffer_formatter.

Consistent naming of pretty-printer formatter as ppf not strange x or o
parameters.

Function ksprintf purposedly defines a new continuation embedding the old
one.

Function asprintf rewritten in a more natural way; spurious pp_flush_queue
deleted in the conitnuation, since it is already done via following
flush_buffer_formatter call.

Indent.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16429 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
flush_str_formatter rewritten using flush_buffer_formatter.

Consistent naming of pretty-printer formatter as ppf not strange x or o
parameters.

Function ksprintf purposedly defines a new continuation embedding the old
one.

Function asprintf rewritten in a more natural way; spurious pp_flush_queue
deleted in the conitnuation, since it is already done via following
flush_buffer_formatter call.

Indent.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16429 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</pre>
</div>
</content>
</entry>
<entry>
<title>PR#6824: fix buffer sharing on partial application of Format.asprintf</title>
<updated>2015-04-26T20:00:57+00:00</updated>
<author>
<name>Gabriel Scherer</name>
<email>gabriel.scherer@gmail.com</email>
</author>
<published>2015-04-26T20:00:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=926cc79f1cc786521cfbfb2bcf17d36c4e415d7a'/>
<id>926cc79f1cc786521cfbfb2bcf17d36c4e415d7a</id>
<content type='text'>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16043 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16043 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</pre>
</div>
</content>
</entry>
<entry>
<title>merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)</title>
<updated>2014-08-22T13:45:02+00:00</updated>
<author>
<name>Damien Doligez</name>
<email>damien.doligez-inria.fr</email>
</author>
<published>2014-08-22T13:45:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=cbfe627f925ab2bab93bae7a7bc9f6ee6afb8637'/>
<id>cbfe627f925ab2bab93bae7a7bc9f6ee6afb8637</id>
<content type='text'>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</pre>
</div>
</content>
</entry>
<entry>
<title>PR#6418: support "@[&lt;hov %d&gt;" in the new format implementation (Benoît Vaugon)</title>
<updated>2014-06-14T21:08:50+00:00</updated>
<author>
<name>Gabriel Scherer</name>
<email>gabriel.scherer@gmail.com</email>
</author>
<published>2014-06-14T21:08:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=49d3f7b9f89826ed1b2d33a144277b390bbc3f2e'/>
<id>49d3f7b9f89826ed1b2d33a144277b390bbc3f2e</id>
<content type='text'>
The bootstrap procedure, as for commit trunk@14973 (see there for
detailed build instructions), requires to first commit a temporary
patch:

&gt; diff -Naur old/typing/typecore.ml new/typing/typecore.ml
&gt; --- old/typing/typecore.ml        2014-06-11 18:16:24.851647309 +0200
&gt; +++ new/typing/typecore.ml        2014-06-11 18:15:50.075646418 +0200
&gt; @@ -2758,16 +2758,9 @@
&gt;        let mk_int n = mk_cst (Const_int n)
&gt;        and mk_string str = mk_cst (Const_string (str, None))
&gt;        and mk_char chr = mk_cst (Const_char chr) in
&gt; -      let mk_block_type bty = match bty with
&gt; -        | Pp_hbox   -&gt; mk_constr "Pp_hbox"   []
&gt; -        | Pp_vbox   -&gt; mk_constr "Pp_vbox"   []
&gt; -        | Pp_hvbox  -&gt; mk_constr "Pp_hvbox"  []
&gt; -        | Pp_hovbox -&gt; mk_constr "Pp_hovbox" []
&gt; -        | Pp_box    -&gt; mk_constr "Pp_box"    []
&gt; -        | Pp_fits   -&gt; mk_constr "Pp_fits"   [] in
&gt;        let rec mk_formatting_lit fmting = match fmting with
&gt; -        | Open_box (org, bty, idt) -&gt;
&gt; -          mk_constr "Open_box" [ mk_string org; mk_block_type bty; mk_int idt ]
&gt; +        | Open_box _ -&gt;
&gt; +          assert false
&gt;          | Close_box -&gt;
&gt;            mk_constr "Close_box" []
&gt;          | Close_tag -&gt;
&gt; @@ -2950,6 +2943,19 @@
&gt;            mk_constr "Alpha" [ mk_fmt rest ]
&gt;          | Theta rest -&gt;
&gt;            mk_constr "Theta" [ mk_fmt rest ]
&gt; +        | Formatting_lit (Open_box (org, _bty, _idt), rest) -&gt;
&gt; +          mk_constr "Formatting_gen" [
&gt; +            mk_constr "Open_box" [
&gt; +              mk_constr "Format" [
&gt; +                mk_constr "String_literal" [
&gt; +                  mk_string "&lt;&gt;";
&gt; +                  mk_constr "End_of_format" [];
&gt; +                ];
&gt; +                mk_string "@[&lt;&gt;";
&gt; +              ]
&gt; +            ];
&gt; +            mk_fmt rest;
&gt; +          ]
&gt;          | Formatting_lit (fmting, rest) -&gt;
&gt;            mk_constr "Formatting_lit" [ mk_formatting_lit fmting; mk_fmt rest ]
&gt;          | Formatting_gen (fmting, rest) -&gt;

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14984 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bootstrap procedure, as for commit trunk@14973 (see there for
detailed build instructions), requires to first commit a temporary
patch:

&gt; diff -Naur old/typing/typecore.ml new/typing/typecore.ml
&gt; --- old/typing/typecore.ml        2014-06-11 18:16:24.851647309 +0200
&gt; +++ new/typing/typecore.ml        2014-06-11 18:15:50.075646418 +0200
&gt; @@ -2758,16 +2758,9 @@
&gt;        let mk_int n = mk_cst (Const_int n)
&gt;        and mk_string str = mk_cst (Const_string (str, None))
&gt;        and mk_char chr = mk_cst (Const_char chr) in
&gt; -      let mk_block_type bty = match bty with
&gt; -        | Pp_hbox   -&gt; mk_constr "Pp_hbox"   []
&gt; -        | Pp_vbox   -&gt; mk_constr "Pp_vbox"   []
&gt; -        | Pp_hvbox  -&gt; mk_constr "Pp_hvbox"  []
&gt; -        | Pp_hovbox -&gt; mk_constr "Pp_hovbox" []
&gt; -        | Pp_box    -&gt; mk_constr "Pp_box"    []
&gt; -        | Pp_fits   -&gt; mk_constr "Pp_fits"   [] in
&gt;        let rec mk_formatting_lit fmting = match fmting with
&gt; -        | Open_box (org, bty, idt) -&gt;
&gt; -          mk_constr "Open_box" [ mk_string org; mk_block_type bty; mk_int idt ]
&gt; +        | Open_box _ -&gt;
&gt; +          assert false
&gt;          | Close_box -&gt;
&gt;            mk_constr "Close_box" []
&gt;          | Close_tag -&gt;
&gt; @@ -2950,6 +2943,19 @@
&gt;            mk_constr "Alpha" [ mk_fmt rest ]
&gt;          | Theta rest -&gt;
&gt;            mk_constr "Theta" [ mk_fmt rest ]
&gt; +        | Formatting_lit (Open_box (org, _bty, _idt), rest) -&gt;
&gt; +          mk_constr "Formatting_gen" [
&gt; +            mk_constr "Open_box" [
&gt; +              mk_constr "Format" [
&gt; +                mk_constr "String_literal" [
&gt; +                  mk_string "&lt;&gt;";
&gt; +                  mk_constr "End_of_format" [];
&gt; +                ];
&gt; +                mk_string "@[&lt;&gt;";
&gt; +              ]
&gt; +            ];
&gt; +            mk_fmt rest;
&gt; +          ]
&gt;          | Formatting_lit (fmting, rest) -&gt;
&gt;            mk_constr "Formatting_lit" [ mk_formatting_lit fmting; mk_fmt rest ]
&gt;          | Formatting_gen (fmting, rest) -&gt;

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14984 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</pre>
</div>
</content>
</entry>
<entry>
<title>PR#6418: fix format regression on "@{&lt;..%d..%s..&gt;" (Benoît Vaugon)</title>
<updated>2014-06-09T13:53:47+00:00</updated>
<author>
<name>Gabriel Scherer</name>
<email>gabriel.scherer@gmail.com</email>
</author>
<published>2014-06-09T13:53:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=7cb9d0d84ea13ae0f984b45f6b9ddae5ca4a5198'/>
<id>7cb9d0d84ea13ae0f984b45f6b9ddae5ca4a5198</id>
<content type='text'>
To be able to compile this patch, you should temporarily apply the
following patch to bootstrap the format type change:

&gt; diff -Naur old/typing/typecore.ml new/typing/typecore.ml
&gt; --- old/typing/typecore.ml	2014-06-06 03:37:03.240926150 +0200
&gt; +++ new/typing/typecore.ml	2014-06-06 03:37:24.696926699 +0200
&gt; @@ -2956,7 +2956,7 @@
&gt;          | Theta rest -&gt;
&gt;            mk_constr "Theta" [ mk_fmt rest ]
&gt;          | Formatting (fmting, rest) -&gt;
&gt; -          mk_constr "Formatting" [ mk_formatting fmting; mk_fmt rest ]
&gt; +          mk_constr "Formatting_lit" [ mk_formatting fmting; mk_fmt rest ]
&gt;          | Reader rest -&gt;
&gt;            mk_constr "Reader" [ mk_fmt rest ]
&gt;          | Scan_char_set (width_opt, char_set, rest) -&gt;

Bootstrap process:

  make core
  apply the patch above
  make core
  make promote-cross
  make partialclean
  revert the patch above, apply the commit
  make partialclean
  make core
  make coreboot

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14973 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To be able to compile this patch, you should temporarily apply the
following patch to bootstrap the format type change:

&gt; diff -Naur old/typing/typecore.ml new/typing/typecore.ml
&gt; --- old/typing/typecore.ml	2014-06-06 03:37:03.240926150 +0200
&gt; +++ new/typing/typecore.ml	2014-06-06 03:37:24.696926699 +0200
&gt; @@ -2956,7 +2956,7 @@
&gt;          | Theta rest -&gt;
&gt;            mk_constr "Theta" [ mk_fmt rest ]
&gt;          | Formatting (fmting, rest) -&gt;
&gt; -          mk_constr "Formatting" [ mk_formatting fmting; mk_fmt rest ]
&gt; +          mk_constr "Formatting_lit" [ mk_formatting fmting; mk_fmt rest ]
&gt;          | Reader rest -&gt;
&gt;            mk_constr "Reader" [ mk_fmt rest ]
&gt;          | Scan_char_set (width_opt, char_set, rest) -&gt;

Bootstrap process:

  make core
  apply the patch above
  make core
  make promote-cross
  make partialclean
  revert the patch above, apply the commit
  make partialclean
  make core
  make coreboot

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14973 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</pre>
</div>
</content>
</entry>
<entry>
<title>Use a nominal datatype for CamlinternalFormat.format6</title>
<updated>2014-05-14T15:07:13+00:00</updated>
<author>
<name>Gabriel Scherer</name>
<email>gabriel.scherer@gmail.com</email>
</author>
<published>2014-05-14T15:07:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=3ffa399b3714c7ce084d05415a0faa0a6c976aa3'/>
<id>3ffa399b3714c7ce084d05415a0faa0a6c976aa3</id>
<content type='text'>
This should make the type-checking of formats simpler and more robust:
instead of trying to find a pair as previously, we can now use the
path of the format6 type directly.

A nice side-effect of the change is that the internal definition of
formats (as a pair) is not printed in error messages anymore.
Because format6 is in fact defined in the CamlinternalFormatBasics
submodule of Pervasives, and has an alias at the toplevel of
Pervasives, error messages still expand the definition:

&gt; Error: This expression has type
&gt;          ('a, 'b, 'c, 'd, 'd, 'a) format6 =
&gt;            ('a, 'b, 'c, 'd, 'd, 'a) CamlinternalFormatBasics.format6
&gt;        but an expression was expected of type ...

Passing the option `-short-paths` does avoid this expansion and
returns exactly the same error message as 4.01:

&gt; Error: This expression has type ('a, 'b, 'c, 'd, 'd, 'a) format6
&gt;        but an expression was expected of type ...

(To get this error message without -short-paths, one would need to
define format6 directly in Pervasives; but this type is mutually
recursive with several GADT types that we don't want to add in the
Pervasives namespace unqualified. This is why I'll keep the alias
for now.)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14868 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should make the type-checking of formats simpler and more robust:
instead of trying to find a pair as previously, we can now use the
path of the format6 type directly.

A nice side-effect of the change is that the internal definition of
formats (as a pair) is not printed in error messages anymore.
Because format6 is in fact defined in the CamlinternalFormatBasics
submodule of Pervasives, and has an alias at the toplevel of
Pervasives, error messages still expand the definition:

&gt; Error: This expression has type
&gt;          ('a, 'b, 'c, 'd, 'd, 'a) format6 =
&gt;            ('a, 'b, 'c, 'd, 'd, 'a) CamlinternalFormatBasics.format6
&gt;        but an expression was expected of type ...

Passing the option `-short-paths` does avoid this expansion and
returns exactly the same error message as 4.01:

&gt; Error: This expression has type ('a, 'b, 'c, 'd, 'd, 'a) format6
&gt;        but an expression was expected of type ...

(To get this error message without -short-paths, one would need to
define format6 directly in Pervasives; but this type is mutually
recursive with several GADT types that we don't want to add in the
Pervasives namespace unqualified. This is why I'll keep the alias
for now.)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14868 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</pre>
</div>
</content>
</entry>
<entry>
<title>fix a regression in Format formatting printing routines</title>
<updated>2014-05-12T15:38:37+00:00</updated>
<author>
<name>Gabriel Scherer</name>
<email>gabriel.scherer@gmail.com</email>
</author>
<published>2014-05-12T15:38:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=0e1584665ebc486999e69546bcd42263a0de525e'/>
<id>0e1584665ebc486999e69546bcd42263a0de525e</id>
<content type='text'>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14842 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14842 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
</pre>
</div>
</content>
</entry>
</feed>
