summaryrefslogtreecommitdiffstats
path: root/stdlib/printf.mli
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>2006-04-05 11:49:07 +0000
committerPierre Weis <Pierre.Weis@inria.fr>2006-04-05 11:49:07 +0000
commit176b3c0da8acab2483256770b1a1e212b672885f (patch)
tree3dae46d2ec99ebddde3f7530e899e2aecb72bedd /stdlib/printf.mli
parentb9b6e0fa2cb9155fccdfe066caea70ddd68a69f6 (diff)
Module Sformat is internal to printf. Better typing specifications of functions working with format strings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/printf.mli')
-rw-r--r--stdlib/printf.mli39
1 files changed, 29 insertions, 10 deletions
diff --git a/stdlib/printf.mli b/stdlib/printf.mli
index fe4b8b2f8..d612f4ad3 100644
--- a/stdlib/printf.mli
+++ b/stdlib/printf.mli
@@ -142,15 +142,34 @@ type index;;
external index_of_int : int -> index = "%identity";;
-val scan_format : string -> 'a array -> index -> int ->
- (index -> string -> int -> 'b) ->
- (index -> 'c -> 'd -> int -> 'b) ->
- (index -> 'e -> int -> 'b) ->
- (index -> int -> 'b) ->
- (index -> ('h, 'i, 'j, 'k) format4 -> int -> 'b) -> 'b
+module Sformat : sig
+ external unsafe_to_string : ('a, 'b, 'c, 'd) format4 -> string
+ = "%identity"
+ external length : ('a, 'b, 'c, 'd) format4 -> int
+ = "%string_length"
+ external get : ('a, 'b, 'c, 'd) format4 -> int -> char
+ = "%string_safe_get"
+ external unsafe_get : ('a, 'b, 'c, 'd) format4 -> int -> char
+ = "%string_unsafe_get"
+ val sub : ('a, 'b, 'c, 'd) format4 -> int -> int -> string
+ val to_string : ('a, 'b, 'c, 'd) format4 -> string
+end
+
+val scan_format : ('a, 'b, 'c, 'd) format4 ->
+ 'e array ->
+ index ->
+ int ->
+ (index -> string -> int -> 'f) ->
+ (index -> 'g -> 'h -> int -> 'f) ->
+ (index -> 'i -> int -> 'f) ->
+ (index -> int -> 'f) ->
+ (index -> ('j, 'k, 'l, 'm) format4 -> int -> 'f) -> 'f
val sub_format :
- (string -> int) -> (string -> int -> char -> int) ->
- char -> string -> int -> int
-val summarize_format_type : string -> string
-val kapr : (string -> Obj.t array -> 'a) -> string -> 'a
+ (('a, 'b, 'c, 'd) format4 -> int) ->
+ (('a, 'b, 'c, 'd) format4 -> int -> char -> int) ->
+ char -> ('a, 'b, 'c, 'd) format4 -> int -> int
+val summarize_format_type : ('a, 'b, 'c, 'd) format4 -> string
+val kapr :
+ (('a, 'b, 'c, 'd) format4 -> Obj.t array -> 'e) ->
+ ('a, 'b, 'c, 'd) format4 -> 'e