opa: build with OCaml 4.03

authored by Vincent Laporte and committed by Vincent Laporte 2ccfc296 8305cce2

+41 -2
+5 -1
pkgs/development/compilers/opa/default.nix
··· 15 15 sha256 = "1qs91rq9xrafv2mf2v415k8lv91ab3ycz0xkpjh1mng5ca3pjlf3"; 16 16 }; 17 17 18 + patches = [ ./ocaml-4.03.patch ]; 19 + 18 20 # Paths so the opa compiler code generation will use the same programs as were 19 21 # used to build opa. 20 22 codeGeneratorPaths = stdenv.lib.makeBinPath [ ocamlPackages.ocaml gcc binutils gnumake nodejs ]; ··· 23 25 patchShebangs . 24 26 ( 25 27 cat ./compiler/buildinfos/buildInfos.ml.pre 26 - ./compiler/buildinfos/generate_buildinfos.sh . --release --version ./compiler/buildinfos/version_major.txt 28 + ./compiler/buildinfos/generate_buildinfos.sh . --release --version ./compiler/buildinfos/version_major.txt 27 29 echo let opa_git_version = ${version} 28 30 echo 'let opa_git_sha = "xxxx"' 29 31 cat ./compiler/buildinfos/buildInfos.ml.post ··· 34 36 done 35 37 export CAMLP4O=${ocamlPackages.camlp4}/bin/camlp4o 36 38 export CAMLP4ORF=${ocamlPackages.camlp4}/bin/camlp4orf 39 + export OCAMLBUILD=${ocamlPackages.ocamlbuild}/bin/ocamlbuild 40 + substituteInPlace _tags --replace ', warn_error_A' "" 37 41 ''; 38 42 39 43 prefixKey = "-prefix ";
+35
pkgs/development/compilers/opa/ocaml-4.03.patch
··· 1 + --- a/compiler/passes/surfaceAstRenaming.ml 2 + +++ b/compiler/passes/surfaceAstRenaming.ml 3 + @@ -1110,7 +1110,7 @@ let find_opt_local_or_global name all_env = 4 + | None -> find_opt_global name all_env 5 + | v -> v 6 + 7 + -let path_expr_to_module_aux p = function 8 + +let path_expr_to_module_aux p : _ -> _ result = function 9 + | Some (OpenedIdent (tree, ident, path)) -> 10 + (match Tree.get_path_opt tree p with 11 + (* the path is not in the tree, which means a 'dot' access 12 + diff --git a/ocamllib/libbase/baseInt64.mli b/ocamllib/libbase/baseInt64.mli 13 + index fb544706..734437f9 100644 14 + --- a/ocamllib/libbase/baseInt64.mli 15 + +++ b/ocamllib/libbase/baseInt64.mli 16 + @@ -40,7 +40,9 @@ external shift_right_logical : int64 -> int -> int64 = "%int64_lsr" 17 + external of_int : int -> int64 = "%int64_of_int" 18 + external to_int : int64 -> int = "%int64_to_int" 19 + external of_float : float -> int64 = "caml_int64_of_float" 20 + + "caml_int64_of_float_unboxed" [@@unboxed] [@@noalloc] 21 + external to_float : int64 -> float = "caml_int64_to_float" 22 + + "caml_int64_to_float_unboxed" [@@unboxed] [@@noalloc] 23 + external of_int32 : int32 -> int64 = "%int64_of_int32" 24 + external to_int32 : int64 -> int32 = "%int64_to_int32" 25 + external of_nativeint : nativeint -> int64 = "%int64_of_nativeint" 26 + @@ -48,7 +50,9 @@ external to_nativeint : int64 -> nativeint = "%int64_to_nativeint" 27 + external of_string : string -> int64 = "caml_int64_of_string" 28 + val to_string : int64 -> string 29 + external bits_of_float : float -> int64 = "caml_int64_bits_of_float" 30 + + "caml_int64_bits_of_float_unboxed" [@@unboxed] [@@noalloc] 31 + external float_of_bits : int64 -> float = "caml_int64_float_of_bits" 32 + + "caml_int64_float_of_bits_unboxed" [@@unboxed] [@@noalloc] 33 + type t = int64 34 + val compare : t -> t -> int 35 + external format : string -> int64 -> string = "caml_int64_format"
+1 -1
pkgs/top-level/all-packages.nix
··· 9698 9698 ocsigen-i18n = callPackage ../development/tools/ocaml/ocsigen-i18n { }; 9699 9699 9700 9700 opa = callPackage ../development/compilers/opa { 9701 - ocamlPackages = ocaml-ng.ocamlPackages_4_02; 9701 + ocamlPackages = ocaml-ng.ocamlPackages_4_03; 9702 9702 }; 9703 9703 9704 9704 opaline = callPackage ../development/tools/ocaml/opaline { };