Merge pull request #221 from rgrinberg/4.06.0-and-safe-string

4.06.0 and safe string
This commit is contained in:
Rudi Grinberg 2017-11-07 13:38:01 +08:00 committed by GitHub
commit 15a02e2de5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 10 deletions

View File

@ -9,6 +9,8 @@ env:
- OCAML_VERSION=4.02 - OCAML_VERSION=4.02
- OCAML_VERSION=4.03 - OCAML_VERSION=4.03
- OCAML_VERSION=4.04 - OCAML_VERSION=4.04
- OCAML_VERSION=4.05
- OCAML_VERSION=4.06
os: os:
- linux - linux
- osx - osx

View File

@ -2,5 +2,6 @@
(executable (executable
((name myutop) ((name myutop)
(flags (:standard -safe-string))
(link_flags (-linkall)) (link_flags (-linkall))
(libraries (utop)))) (libraries (utop))))

View File

@ -2,5 +2,6 @@
(executable (executable
((name test_program) ((name test_program)
(flags (:standard -safe-string))
(link_flags (-linkall)) (link_flags (-linkall))
(libraries (utop)))) (libraries (utop))))

View File

@ -1,7 +1,6 @@
;; This file is used by `make all-supported-ocaml-versions` ;; This file is used by `make all-supported-ocaml-versions`
(context ((switch 4.02.3))) (context ((switch 4.02.3)))
(context ((switch 4.03.0))) (context ((switch 4.03.0)))
(context ((switch 4.04.1))) (context ((switch 4.04.2)))
(context ((switch 4.05.0+trunk))) (context ((switch 4.05.0)))
;; 4.06 support is broken for now (context ((switch 4.06.0)))
;; (context ((switch 4.06.0+trunk)))

View File

@ -4,6 +4,7 @@
((name uTop) ((name uTop)
(public_name utop) (public_name utop)
(wrapped false) (wrapped false)
(flags (:standard -safe-string))
(modes (byte)) (modes (byte))
(libraries (compiler-libs.toplevel findlib.top lambda-term threads)) (libraries (compiler-libs.toplevel findlib.top lambda-term threads))
(preprocess (action (run ${bin:cppo} -V OCAML:${ocaml_version} ${<}))))) (preprocess (action (run ${bin:cppo} -V OCAML:${ocaml_version} ${<})))))

View File

@ -180,7 +180,10 @@ let discard_formatters pps f =
(* Output functions. *) (* Output functions. *)
let out_functions = { let out_functions = {
Format.out_string = (fun _ _ _ -> ()); out_flush = ignore; Format.out_string = (fun _ _ _ -> ()); out_flush = ignore;
out_newline = ignore; out_spaces = ignore; out_newline = ignore; out_spaces = ignore
#if OCAML_VERSION >= (4, 06, 0)
; out_indent = ignore
#endif
} in } in
(* Replace formatter functions. *) (* Replace formatter functions. *)
List.iter (fun pp -> Format.pp_set_formatter_out_functions pp out_functions) pps; List.iter (fun pp -> Format.pp_set_formatter_out_functions pp out_functions) pps;

View File

@ -2,4 +2,5 @@
(executable (executable
((name expunge) ((name expunge)
(flags (:standard -safe-string))
(libraries (unix)))) (libraries (unix))))

View File

@ -3,6 +3,7 @@
(executables (executables
((names (utop)) ((names (utop))
(libraries (utop)) (libraries (utop))
(flags (:standard -safe-string))
(link_flags (-linkall)))) (link_flags (-linkall))))
(rule (rule

View File

@ -1,6 +1,5 @@
Universal toplevel for OCaml Universal toplevel for OCaml
utop is an improved toplevel for OCaml. It can run in a terminal or in
Emacs. It supports line edition, history, real-time and context
sensitive completion, colors, and more.
It integrates with the tuareg mode in Emacs. utop is an improved toplevel for OCaml. It can run in a terminal or in Emacs. It
supports line edition, history, real-time and context sensitive completion,
colors, and more. It integrates with the tuareg mode in Emacs.

View File

@ -15,9 +15,11 @@ depends: [
"ocamlfind" {>= "1.7.2"} "ocamlfind" {>= "1.7.2"}
"lambda-term" {>= "1.2"} "lambda-term" {>= "1.2"}
"lwt" "lwt"
"lwt_react"
"camomile" "camomile"
"react" {>= "1.0.0"} "react" {>= "1.0.0"}
"cppo" {build & >= "1.1.2"} "cppo" {build & >= "1.1.2"}
"jbuilder" {build & >= "1.0+beta9"} "jbuilder" {build & >= "1.0+beta9"}
] ]
available: [ ocaml-version >= "4.02.3" & ocaml-version < "4.06.0"] build-test: [["jbuilder" "runtest" "-p" name "-j" jobs]]
available: [ocaml-version >= "4.02.3"]