diff --git a/dev-ml/eliom/Manifest b/dev-ml/eliom/Manifest index 08bcca8f1aa85..3b5090ee27e18 100644 --- a/dev-ml/eliom/Manifest +++ b/dev-ml/eliom/Manifest @@ -1,2 +1 @@ -DIST eliom-5.0.0.tar.gz 728278 SHA256 6726500f9a54478def95875d04098dc8dc829d4a10e06896ff4f037bb1c03cbd SHA512 1c5297e376c3a46935de369b418638a772304246b73756f8bc052301b48d62a37af527274bf1a05064f33b60ff9dcde057a0030f083136fa4e1c0cfa07f01887 WHIRLPOOL ca1186787a8f938cf029f9a5c9904ed0324a3d24d2f0d0834dd1e2b2f995de6d57d1040b4d128de8233255ca385478f0ba3bf597c2f0315ab2f1894118755dca DIST eliom-6.0.0.tar.gz 722673 SHA256 ec5636481be9cccc8256b13a5e551f6a8c32662e1c3211887a22eedf5c8958f9 SHA512 c59261bb6ba2303a7951de2e689abcb55af92b53a145d42054244d253b6757d72ba3f937772219b2b0aa5bccfe1a74baf62c938f40c1cce90720b6efe7be3b63 WHIRLPOOL e4f8c44c16dbc33c7576a117a25cb2f709a893ad82baa517fb2d5a776b0838affbef56aba84a977903c71d32987f3d16af485c5cf8dddd1cc39395025d996226 diff --git a/dev-ml/eliom/eliom-5.0.0-r2.ebuild b/dev-ml/eliom/eliom-5.0.0-r2.ebuild deleted file mode 100644 index 0807fa3c4eb28..0000000000000 --- a/dev-ml/eliom/eliom-5.0.0-r2.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit eutils multilib findlib - -DESCRIPTION="A web framework to program client/server applications" -HOMEPAGE="http://ocsigen.org/eliom/" -SRC_URI="https://github.com/ocsigen/eliom/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="LGPL-2.1-with-linking-exception" -SLOT="0/${PV}" -KEYWORDS="~amd64" -IUSE="doc +ocamlopt +ppx" - -RDEPEND=">=dev-lang/ocaml-4.03:=[ocamlopt?] - >=dev-ml/js_of_ocaml-2.8.2:= - >=www-servers/ocsigenserver-2.8:= - >=dev-ml/tyxml-4:= - >=dev-ml/deriving-0.6:= - >=dev-ml/reactiveData-0.2.1:= - dev-ml/ocaml-ipaddr:= - dev-ml/react:= - dev-ml/ocaml-ssl:= - >=dev-ml/lwt-2.5.0:= - dev-ml/calendar:= - dev-ml/camlp4:= - ppx? ( >=dev-ml/ppx_tools-0.99.3:= )" -DEPEND="${RDEPEND} - dev-ml/ocamlbuild - dev-ml/opam" - -src_prepare() { - epatch "${FILESDIR}/"{camlp4,oc43,oc43-2}.patch \ - "${FILESDIR}/tyxml4.patch" \ - "${FILESDIR}/jsofocaml-282.patch" \ - "${FILESDIR}/reactivedata.patch" \ - "${FILESDIR}/ocsigen28.patch" -} - -src_compile() { - if use ocamlopt ; then - emake PPX=$(usex ppx true false) all - else - emake PPX=$(usex ppx true false) byte - fi - use doc && emake doc - emake man -} - -src_install() { - opam-installer \ - --prefix="${ED}/usr" \ - --libdir="${D}/$(ocamlc -where)" \ - --docdir="${ED}/usr/share/doc/${PF}" \ - --mandir="${ED}/usr/share/man" \ - || die - dodoc CHANGES README.md - if use doc ; then - docinto client/html - dodoc -r _build/src/lib/client/api.docdir/* - docinto server/html - dodoc -r _build/src/lib/server/api.docdir/* - fi -} diff --git a/dev-ml/eliom/files/camlp4.patch b/dev-ml/eliom/files/camlp4.patch deleted file mode 100644 index 59e94ab462a28..0000000000000 --- a/dev-ml/eliom/files/camlp4.patch +++ /dev/null @@ -1,48 +0,0 @@ -commit f157a5b913451b85e8cfe7549c66e5c98669233b -Author: Vasilis Papavasileiou -Date: Wed Mar 2 14:23:02 2016 +0100 - - Compile against Camlp4 4.02+7 - -diff --git a/src/syntax/pa_eliom_seed.ml b/src/syntax/pa_eliom_seed.ml -index c101ff8..dc31caa 100644 ---- a/src/syntax/pa_eliom_seed.ml -+++ b/src/syntax/pa_eliom_seed.ml -@@ -632,8 +632,26 @@ module Register(Id : sig val name: string end)(Pass : Pass) = struct - | None -> - Printf.ksprintf (Syntax_error.raise loc) fmt - -- module E2 = Camlp4.ErrorHandler.Register(Syntax_error) -- DELETE_RULE Gram expr: "{"; TRY [label_expr_list; "}"] END; -+ module E2 = Camlp4.ErrorHandler.Register(Syntax_error) ;; -+ -+ try -+ DELETE_RULE Gram expr: "{"; TRY [label_expr_list; "}"] END -+ with Camlp4.Struct.Grammar.Delete.Rule_not_found _ -> -+ (let test_record_field = -+ Gram.Entry.of_parser "record_field" (fun strm -> -+ let rec loop = function -+ | [] -> () -+ | (UIDENT _, _) :: (KEYWORD ".", _) :: rest -> loop rest -+ | (LIDENT _, _) :: (KEYWORD "=", _) :: _ -> () -+ | (LIDENT _, _) :: (KEYWORD ";", _) :: _ -> () -+ | [LIDENT _, _] -> () -+ | _ -> raise Stream.Failure -+ in -+ loop (Stream.npeek 100 strm)) -+ in -+ DELETE_RULE Gram expr: -+ "{"; test_record_field; label_expr_list; "}" END) ;; -+ - DELETE_RULE Gram expr: "{"; TRY [expr LEVEL "."; "with"]; label_expr_list; "}" END; - - (* Extending syntax *) -@@ -812,7 +830,7 @@ module Register(Id : sig val name: string end)(Pass : Pass) = struct - expr: LEVEL "simple" - - [ [ KEYWORD "{"; lel = TRY [lel = label_expr_list; "}" -> lel] -> -- <:expr< { $lel$ } >> -+ Ast.ExRec (_loc, lel, Ast.ExNil _loc) - | KEYWORD "{shared#"; - typ = TRY [ typ = OPT ctyp; KEYWORD "{" -> typ]; - opt_lvl = dummy_set_level_shared_value_expr ; diff --git a/dev-ml/eliom/files/jsofocaml-282.patch b/dev-ml/eliom/files/jsofocaml-282.patch deleted file mode 100644 index 985432ff75ed8..0000000000000 --- a/dev-ml/eliom/files/jsofocaml-282.patch +++ /dev/null @@ -1,361 +0,0 @@ -Backported from: - -commit 4edaf2275e2f7a027f3c7dc52e1e295a6e56b19a -Author: Vasilis Papavasileiou -Date: Thu Aug 18 19:40:56 2016 +0200 - - Fix ocsigen/js_of_ocaml#518 - -upstream. - -Index: eliom-5.0.0/src/lib/eliom_client.client.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_client.client.ml -+++ eliom-5.0.0/src/lib/eliom_client.client.ml -@@ -461,23 +461,29 @@ let raw_event_handler value = - - let closure_name_prefix = Eliom_lib_base.RawXML.closure_name_prefix - let closure_name_prefix_len = String.length closure_name_prefix --let reify_caml_event name node ce : string * (#Dom_html.event Js.t -> bool) = -+let reify_caml_event name node ce = - match ce with -- | Xml.CE_call_service None -> name,(fun _ -> true) -+ | Xml.CE_call_service None -> name, `Other (fun _ -> true) - | Xml.CE_call_service (Some (`A, cookies_info, tmpl)) -> -- name, (fun ev -> -+ name, `Other (fun ev -> - let node = Js.Opt.get (Dom_html.CoerceTo.a node) - (fun () -> Lwt_log.raise_error ~section "not an anchor element") - in - raw_a_handler node cookies_info tmpl ev) - | Xml.CE_call_service - (Some ((`Form_get | `Form_post) as kind, cookies_info, tmpl)) -> -- name, (fun ev -> -+ name, `Other (fun ev -> - let form = Js.Opt.get (Dom_html.CoerceTo.form node) - (fun () -> Lwt_log.raise_error ~section "not a form element") in - raw_form_handler form kind cookies_info tmpl ev) - | Xml.CE_client_closure f -> -- name, (fun ev -> try f ev; true with False -> false) -+ name, `Other (fun ev -> try f ev; true with False -> false) -+ | Xml.CE_client_closure_keyboard f -> -+ name, -+ `Keyboard (fun ev -> try f ev; true with Eliom_lib.False -> false) -+ | Xml.CE_client_closure_mouse f -> -+ name, -+ `Mouse (fun ev -> try f ev; true with Eliom_lib.False -> false) - | Xml.CE_registered_closure (_, cv) -> - let name = - let len = String.length name in -@@ -485,16 +491,27 @@ let reify_caml_event name node ce : stri - then String.sub name closure_name_prefix_len - (len - closure_name_prefix_len) - else name in -- name, raw_event_handler cv -+ name, `Other (raw_event_handler cv) - - let register_event_handler, flush_load_script = - let add, _, flush = create_buffer () in - let register node (name, ev) = -- let name,f = reify_caml_event name node ev in -- if name = "onload" -- then add f -- else Js.Unsafe.set node (Js.bytestring name) -- (Dom_html.handler (fun ev -> Js.bool (f ev))) -+ match reify_caml_event name node ev with -+ | "onload", `Other f -> -+ add f -+ | "onload", `Keyboard _ -> -+ failwith "keyboard event handler for onload" -+ | "onload", `Mouse _ -> -+ failwith "keyboard event handler for onload" -+ | name, `Other f -> -+ Js.Unsafe.set node (Js.bytestring name) -+ (Dom_html.handler (fun ev -> Js.bool (f ev))) -+ | name, `Keyboard f -> -+ Js.Unsafe.set node (Js.bytestring name) -+ (Dom_html.handler (fun ev -> Js.bool (f ev))) -+ | name, `Mouse f -> -+ Js.Unsafe.set node (Js.bytestring name) -+ (Dom_html.handler (fun ev -> Js.bool (f ev))) - in - let flush () = - let fs = flush () in -Index: eliom-5.0.0/src/lib/eliom_content.server.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content.server.mli -+++ eliom-5.0.0/src/lib/eliom_content.server.mli -@@ -114,7 +114,7 @@ module Xml : sig - example {% <>%} or {% <>%}. *) -- type -'a caml_event_handler constraint 'a = #Dom_html.event -+ type caml_event_handler - - (**/**) - -@@ -129,18 +129,14 @@ module Xml : sig - val make_event_handler_table : elt -> Eliom_lib.RawXML.event_handler_table - val make_client_attrib_table : elt -> Eliom_lib.RawXML.client_attrib_table - -- val caml_event_handler : ((#Dom_html.event as 'a) Js.t -> unit) Eliom_lib.client_value -> 'a caml_event_handler -- -- class type biggest_event = object -- inherit Dom_html.event -- inherit Dom_html.mouseEvent -- inherit Dom_html.keyboardEvent -- end -+ val caml_event_handler : -+ (Dom_html.event Js.t -> unit) Eliom_lib.client_value -> -+ caml_event_handler - - type racontent = - | RA of acontent - | RAReact of acontent option React.signal -- | RACamlEventHandler of biggest_event caml_event_handler -+ | RACamlEventHandler of caml_event_handler - | RALazyStr of string Eliom_lazy.request - | RALazyStrL of separator * string Eliom_lazy.request list - | RAClient of string * attrib option * Eliom_lib.poly -Index: eliom-5.0.0/src/lib/eliom_content_core.client.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_core.client.ml -+++ eliom-5.0.0/src/lib/eliom_content_core.client.ml -@@ -87,21 +87,19 @@ module Xml = struct - let node ?(a = []) name children = make (Node (name, a, children)) - let lazy_node ?a name children = node ?a name (Eliom_lazy.force children) - -- type biggest_event_handler = biggest_event Js.t -> unit -- - type event_handler = Dom_html.event Js.t -> unit - type mouse_event_handler = Dom_html.mouseEvent Js.t -> unit - type keyboard_event_handler = Dom_html.keyboardEvent Js.t -> unit - - let event_handler_attrib name (value : event_handler) = - internal_event_handler_attrib name -- (Caml (CE_client_closure (value :> biggest_event_handler))) -+ (Caml (CE_client_closure value)) - let mouse_event_handler_attrib name (value : mouse_event_handler) = - internal_event_handler_attrib name -- (Caml (CE_client_closure (value :> biggest_event_handler))) -+ (Caml (CE_client_closure_mouse value)) - let keyboard_event_handler_attrib name (value : keyboard_event_handler) = - internal_event_handler_attrib name -- (Caml (CE_client_closure (value :> biggest_event_handler))) -+ (Caml (CE_client_closure_keyboard value)) - - let node_react_children ?(a = []) name children = - {elt = Lazy.from_val (ReactChildren (Node (name,a,[]),children)); node_id=NoId} -Index: eliom-5.0.0/src/lib/eliom_content_core.client.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_core.client.mli -+++ eliom-5.0.0/src/lib/eliom_content_core.client.mli -@@ -35,24 +35,21 @@ module Xml : sig - type aname = string - type attrib - -- type -'a caml_event_handler = -+ type caml_event_handler = - | CE_registered_closure of string * Eliom_lib.poly - (* 'a Js.t -> unit) client_value_server *) -- | CE_client_closure of ((#Dom_html.event as 'a) Js.t -> unit) -+ | CE_client_closure of -+ (Dom_html.event Js.t -> unit) (* Client side-only *) -+ | CE_client_closure_mouse of -+ (Dom_html.mouseEvent Js.t -> unit) (* Client side-only *) -+ | CE_client_closure_keyboard of -+ (Dom_html.keyboardEvent Js.t -> unit) (* Client side-only *) - | CE_call_service of - ([ `A | `Form_get | `Form_post] * (bool * string list) option * string option) option Eliom_lazy.request - -- (* Inherit from all events. -- Necessary for subtyping since caml_event_handler is contravariant. *) -- class type biggest_event = object -- inherit Dom_html.event -- inherit Dom_html.mouseEvent -- inherit Dom_html.keyboardEvent -- end -- - type internal_event_handler = - | Raw of string -- | Caml of biggest_event caml_event_handler -+ | Caml of caml_event_handler - type event_handler = Dom_html.event Js.t -> unit - type mouse_event_handler = Dom_html.mouseEvent Js.t -> unit - type keyboard_event_handler = Dom_html.keyboardEvent Js.t -> unit -@@ -89,7 +86,7 @@ module Xml : sig - type racontent = - | RA of acontent - | RAReact of acontent option React.signal -- | RACamlEventHandler of biggest_event caml_event_handler -+ | RACamlEventHandler of caml_event_handler - | RALazyStr of string Eliom_lazy.request - | RALazyStrL of separator * string Eliom_lazy.request list - | RAClient of string * attrib option * Eliom_lib.poly -Index: eliom-5.0.0/src/lib/eliom_content_core.server.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_core.server.ml -+++ eliom-5.0.0/src/lib/eliom_content_core.server.ml -@@ -114,7 +114,6 @@ module Xml = struct - let lazy_node ?(a = []) name children = - make_lazy (Eliom_lazy.from_fun (fun () -> (Node (name, a, Eliom_lazy.force children)))) - -- type biggest_event_handler = (biggest_event Js.t -> unit) Eliom_lib.client_value - type event_handler = (Dom_html.event Js.t -> unit) Eliom_lib.client_value - type mouse_event_handler = (Dom_html.mouseEvent Js.t -> unit) Eliom_lib.client_value - type keyboard_event_handler = (Dom_html.keyboardEvent Js.t -> unit) Eliom_lib.client_value -@@ -133,11 +132,11 @@ module Xml = struct - let biggest_event_handler_attrib name cf = - internal_event_handler_attrib name (event_handler cf) - let event_handler_attrib name (cf : event_handler) = -- biggest_event_handler_attrib name (cf :> biggest_event_handler) -+ biggest_event_handler_attrib name cf - let mouse_event_handler_attrib name (cf : mouse_event_handler) = -- biggest_event_handler_attrib name (cf :> biggest_event_handler) -+ biggest_event_handler_attrib name cf - let keyboard_event_handler_attrib name (cf : keyboard_event_handler) = -- biggest_event_handler_attrib name (cf :> biggest_event_handler) -+ biggest_event_handler_attrib name cf - - let client_attrib ?init (x : attrib Eliom_lib.client_value) = - let crypto = make_cryptographic_safe_string () in -Index: eliom-5.0.0/src/lib/eliom_content_core.server.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_core.server.mli -+++ eliom-5.0.0/src/lib/eliom_content_core.server.mli -@@ -28,7 +28,7 @@ module Xml : sig - and type mouse_event_handler = (Dom_html.mouseEvent Js.t -> unit) Eliom_lib.client_value - and type keyboard_event_handler = (Dom_html.keyboardEvent Js.t -> unit) Eliom_lib.client_value - -- type -'a caml_event_handler constraint 'a = #Dom_html.event -+ type caml_event_handler - - (**/**) - -@@ -43,15 +43,9 @@ module Xml : sig - val make_event_handler_table : elt -> Eliom_lib.RawXML.event_handler_table - val make_client_attrib_table : elt -> Eliom_lib.RawXML.client_attrib_table - -- class type biggest_event = object -- inherit Dom_html.event -- inherit Dom_html.mouseEvent -- inherit Dom_html.keyboardEvent -- end -- - type internal_event_handler = - | Raw of string -- | Caml of biggest_event caml_event_handler -+ | Caml of caml_event_handler - - val internal_event_handler_attrib : aname -> internal_event_handler -> attrib - val internal_event_handler_of_service : -@@ -59,12 +53,14 @@ module Xml : sig - * (bool * string list) option - * string option) option Eliom_lazy.request -> internal_event_handler - -- val caml_event_handler : ((#Dom_html.event as 'a) Js.t -> unit) Eliom_lib.client_value -> 'a caml_event_handler -+ val caml_event_handler : -+ (Dom_html.event Js.t -> unit) Eliom_lib.client_value -> -+ caml_event_handler - - type racontent = - | RA of acontent - | RAReact of acontent option React.signal -- | RACamlEventHandler of biggest_event caml_event_handler -+ | RACamlEventHandler of caml_event_handler - | RALazyStr of string Eliom_lazy.request - | RALazyStrL of separator * string Eliom_lazy.request list - | RAClient of string * attrib option * Eliom_lib.poly -Index: eliom-5.0.0/src/lib/eliom_lib_base.shared.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_lib_base.shared.ml -+++ eliom-5.0.0/src/lib/eliom_lib_base.shared.ml -@@ -70,26 +70,22 @@ module RawXML = struct - - type cookie_info = (bool * string list) deriving (Json) - -- type -'a caml_event_handler = -+ type caml_event_handler = - | CE_registered_closure of - string * poly (* 'a Js.t -> unit) client_value *) - | CE_client_closure of -- ((#Dom_html.event as 'a) Js.t -> unit) (* Client side-only *) -+ (Dom_html.event Js.t -> unit) (* Client side-only *) -+ | CE_client_closure_mouse of -+ (Dom_html.mouseEvent Js.t -> unit) (* Client side-only *) -+ | CE_client_closure_keyboard of -+ (Dom_html.keyboardEvent Js.t -> unit) (* Client side-only *) - | CE_call_service of - ([ `A | `Form_get | `Form_post] * (cookie_info option) * string option) - option Eliom_lazy.request - -- (* Inherit from all events. -- Necessary for subtyping since caml_event_handler is contravariant. *) -- class type biggest_event = object -- inherit Dom_html.event -- inherit Dom_html.mouseEvent -- inherit Dom_html.keyboardEvent -- end -- - type internal_event_handler = - | Raw of string -- | Caml of biggest_event caml_event_handler -+ | Caml of caml_event_handler - - type uri = string Eliom_lazy.request - let string_of_uri = Eliom_lazy.force -@@ -128,7 +124,7 @@ module RawXML = struct - type racontent = - | RA of acontent - | RAReact of acontent option React.signal -- | RACamlEventHandler of biggest_event caml_event_handler -+ | RACamlEventHandler of caml_event_handler - | RALazyStr of string Eliom_lazy.request - | RALazyStrL of separator * string Eliom_lazy.request list - | RAClient of string * attrib option * poly (*attrib client_value *) -Index: eliom-5.0.0/src/lib/eliom_lib_base.shared.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_lib_base.shared.mli -+++ eliom-5.0.0/src/lib/eliom_lib_base.shared.mli -@@ -73,24 +73,21 @@ module RawXML : sig - - type cookie_info = (bool * string list) deriving (Json) - -- type -'a caml_event_handler = -+ type caml_event_handler = - | CE_registered_closure of - string * poly (* 'a Js.t -> unit) client_value *) -- | CE_client_closure of ((#Dom_html.event as 'a) Js.t -> unit) -+ | CE_client_closure of -+ (Dom_html.event Js.t -> unit) (* Client side-only *) -+ | CE_client_closure_mouse of -+ (Dom_html.mouseEvent Js.t -> unit) (* Client side-only *) -+ | CE_client_closure_keyboard of -+ (Dom_html.keyboardEvent Js.t -> unit) (* Client side-only *) - | CE_call_service of - ([ `A | `Form_get | `Form_post] * (cookie_info option) * string option) option Eliom_lazy.request - -- (* Inherit from all events. -- Necessary for subtyping since caml_event_handler is contravariant. *) -- class type biggest_event = object -- inherit Dom_html.event -- inherit Dom_html.mouseEvent -- inherit Dom_html.keyboardEvent -- end -- - type internal_event_handler = - | Raw of string -- | Caml of biggest_event caml_event_handler -+ | Caml of caml_event_handler - - type uri = string Eliom_lazy.request - val string_of_uri : uri -> string -@@ -127,7 +124,7 @@ module RawXML : sig - type racontent = - | RA of acontent - | RAReact of acontent option React.signal -- | RACamlEventHandler of biggest_event caml_event_handler -+ | RACamlEventHandler of caml_event_handler - | RALazyStr of string Eliom_lazy.request - | RALazyStrL of separator * string Eliom_lazy.request list - | RAClient of string * attrib option * poly (* attrib client_value *) diff --git a/dev-ml/eliom/files/oc43-2.patch b/dev-ml/eliom/files/oc43-2.patch deleted file mode 100644 index c7eb8e25a01a8..0000000000000 --- a/dev-ml/eliom/files/oc43-2.patch +++ /dev/null @@ -1,136 +0,0 @@ -commit 27c69ac5dfbc26744e304232bb8c0cf22d396082 -Author: Vasilis Papavasileiou -Date: Thu May 5 11:14:02 2016 -0400 - - Fix PPX for 4.03 (empty let bindings) - -diff --git a/src/ppx/ppx_eliom_client.ml b/src/ppx/ppx_eliom_client.ml -index 580d2b5..fb2d263 100644 ---- a/src/ppx/ppx_eliom_client.ml -+++ b/src/ppx/ppx_eliom_client.ml -@@ -89,21 +89,25 @@ module Pass = struct - ] - - let define_client_functions ~loc client_value_datas = -- let bindings = -- List.map -- (fun (_num, id, expr, args) -> -- let patt = Pat.var id in -- let typ = find_fragment id in -- let args = List.map Pat.var args in -- let expr = -- [%expr -- fun [%p pat_args args] -> ([%e expr] : [%t typ]) -- ] [@metaloc loc] -- in -- Vb.mk ~loc patt expr) -- client_value_datas -- in -- Str.value ~loc Nonrecursive bindings -+ match client_value_datas with -+ | [] -> -+ [] -+ | _ -> -+ let bindings = -+ List.map -+ (fun (_num, id, expr, args) -> -+ let patt = Pat.var id in -+ let typ = find_fragment id in -+ let args = List.map Pat.var args in -+ let expr = -+ [%expr -+ fun [%p pat_args args] -> ([%e expr] : [%t typ]) -+ ] [@metaloc loc] -+ in -+ Vb.mk ~loc patt expr) -+ client_value_datas -+ in -+ [Str.value ~loc Nonrecursive bindings] - - (* For injections *) - -@@ -139,8 +143,8 @@ module Pass = struct - let client_expr_data = flush_client_value_datas () in - open_client_section loc :: - register_client_closures client_expr_data @ -- [ define_client_functions loc client_expr_data ; -- item ; -+ define_client_functions loc client_expr_data @ -+ [ item ; - close_server_section loc ; - ] - -@@ -155,11 +159,13 @@ module Pass = struct - push_client_value_data num id expr - (List.map fst escaped_bindings); - -- match context with -- | `Server -> -+ match context, escaped_bindings with -+ | `Server, _ -> - (* We are in a server fragment, this code should always be discarded. *) - Exp.extension @@ AM.extension_of_error @@ Location.errorf "Eliom: ICE" -- | `Shared -> -+ | `Shared, [] -> -+ [%expr [%e frag_eid] ()][@metaloc loc] -+ | `Shared, _ -> - let bindings = - List.map - (fun (gen_id, expr) -> -diff --git a/src/ppx/ppx_eliom_server.ml b/src/ppx/ppx_eliom_server.ml -index 97f0b53..b5238ad 100644 ---- a/src/ppx/ppx_eliom_server.ml -+++ b/src/ppx/ppx_eliom_server.ml -@@ -85,6 +85,7 @@ module Pass = struct - let $gen_id$ = $orig_expr$ and ... - (Necessary for injections in shared section) *) - let bind_injected_idents injections = -+ assert (injections <> []); - let bindings = - List.map - (fun (txt, expr,_) -> -@@ -134,10 +135,15 @@ module Pass = struct - - let client_str item = - let all_injections = flush_injections () in -- let loc = item.pstr_loc in -- [ bind_injected_idents all_injections; -+ let ccs = -+ let loc = item.pstr_loc in - close_client_section loc all_injections -- ] -+ in -+ match all_injections with -+ | [] -> -+ [ ccs ] -+ | l -> -+ [ bind_injected_idents l ; ccs ] - - let server_str item = [ - item ; -@@ -146,12 +152,19 @@ module Pass = struct - - let shared_str item = - let all_injections = flush_injections () in -- let loc = item.pstr_loc in -- [ bind_injected_idents all_injections ; -- item ; -- close_server_section loc ; -- close_client_section loc all_injections ; -- ] -+ let cl = -+ let loc = item.pstr_loc in -+ [ -+ item; -+ close_server_section loc ; -+ close_client_section loc all_injections ; -+ ] -+ in -+ match all_injections with -+ | [] -> -+ cl -+ | l -> -+ bind_injected_idents l :: cl - - let fragment ?typ ~context:_ ~num ~id expr = - let typ = diff --git a/dev-ml/eliom/files/oc43.patch b/dev-ml/eliom/files/oc43.patch deleted file mode 100644 index 07d2729928a49..0000000000000 --- a/dev-ml/eliom/files/oc43.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: eliom-5.0.0/src/lib/eliom_lib.client.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_lib.client.mli -+++ eliom-5.0.0/src/lib/eliom_lib.client.mli -@@ -43,7 +43,6 @@ type 'a shared_value = 'a - - val create_shared_value : 'a -> 'a client_value -> 'a shared_value - --exception Eliom_Internal_Error of string - - (** This exception is raised (in Lwt) on the client if a call to a - server function {% < <:sig_item< >> - | si -> super#sig_item si - method ctyp ty = match ty with diff --git a/dev-ml/eliom/files/ocsigen28.patch b/dev-ml/eliom/files/ocsigen28.patch deleted file mode 100644 index fb3ef0a3cf263..0000000000000 --- a/dev-ml/eliom/files/ocsigen28.patch +++ /dev/null @@ -1,500 +0,0 @@ -Index: eliom-5.0.0/src/lib/eliom_common.server.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_common.server.ml -+++ eliom-5.0.0/src/lib/eliom_common.server.ml -@@ -1372,7 +1372,7 @@ let create_persistent_table name = - - let persistent_cookies_table : - (full_state_name * float option * timeout * perssessgrp option) -- Ocsipersist.table Lazy.t = -+ Ocsipersist.table Lwt.t Lazy.t = - lazy (create_persistent_table eliom_persistent_cookie_table) - (* Another tables, containing the session info for each cookie *) - (* the table contains: -@@ -1390,7 +1390,7 @@ let persistent_cookies_table : - let remove_from_all_persistent_tables key = - Perstables.fold (* could be replaced by a parallel map *) - (fun thr t -> thr >>= fun () -> -- Ocsipersist.remove (Ocsipersist.open_table t) key >>= Lwt_unix.yield) -+ Ocsipersist.open_table t >>= fun table -> Ocsipersist.remove table key >>= Lwt_unix.yield) - (return ()) - !perstables - -Index: eliom-5.0.0/src/lib/eliom_common.server.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_common.server.mli -+++ eliom-5.0.0/src/lib/eliom_common.server.mli -@@ -609,10 +609,10 @@ module Perstables : - val fold : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a - end - val perstables : string list ref --val create_persistent_table : string -> 'a Ocsipersist.table -+val create_persistent_table : string -> 'a Ocsipersist.table Lwt.t - val persistent_cookies_table : - (full_state_name * float option * timeout * perssessgrp option) -- Ocsipersist.table Lazy.t -+ Ocsipersist.table Lwt.t Lazy.t - val remove_from_all_persistent_tables : string -> unit Lwt.t - val absolute_change_sitedata : sitedata -> unit - val get_current_sitedata : unit -> sitedata -Index: eliom-5.0.0/src/lib/eliom_reference.server.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_reference.server.ml -+++ eliom-5.0.0/src/lib/eliom_reference.server.ml -@@ -32,8 +32,8 @@ type 'a eref_kind = - | Ref of 'a lazy_t ref (* Ocaml reference *) - | Vol of 'a volatile_table Lazy.t (* Vol. table (group, session, process) *) - | Ocsiper of 'a option Ocsipersist.t Lwt.t (* Global persist. table *) -- | Ocsiper_sit of 'a Ocsipersist.table (* Persist. table for site *) -- | Per of 'a persistent_table (* Persist. table for group session or process *) -+ | Ocsiper_sit of 'a Ocsipersist.table Lwt.t (* Persist. table for site *) -+ | Per of 'a persistent_table Lwt.t (* Persist. table for group session or process *) - - type volatile = [ `Volatile ] - type persistent = [ `Persistent ] -@@ -174,9 +174,7 @@ let eref_from_fun_ ~ext ~scope ?secure ? - | None -> (Volatile.eref_from_fun_ ~ext ~scope ?secure f :> _ eref) - | Some name -> - (f, ext, -- Ocsiper (Ocsipersist.make_persistent -- ~store:pers_ref_store -- ~name ~default:None)) -+ Ocsiper (pers_ref_store >>= fun store -> Ocsipersist.make_persistent ~store ~name ~default:None)) - end - | `Site -> - begin -@@ -207,6 +205,7 @@ let get_site_id () = - let get (f, _, table as eref) = - match table with - | Per t -> -+ t >>= fun t -> - (get_persistent_data ~table:t () >>= function - | Data d -> Lwt.return d - | _ -> -@@ -221,6 +220,7 @@ let get (f, _, table as eref) = - Ocsipersist.set r (Some value) >>= fun () -> - Lwt.return value) - | Ocsiper_sit t -> -+ t >>= fun t -> - (let site_id = get_site_id () in - try_lwt Ocsipersist.find t site_id - with Not_found -> -@@ -231,9 +231,10 @@ let get (f, _, table as eref) = - - let set (_, _, table as eref) value = - match table with -- | Per t -> set_persistent_data ~table:t value -+ | Per t -> t >>= fun t -> set_persistent_data ~table:t value - | Ocsiper r -> r >>= fun r -> Ocsipersist.set r (Some value) - | Ocsiper_sit t -> -+ t >>= fun t -> - Ocsipersist.add t (get_site_id ()) value - | _ -> Lwt.return (Volatile.set eref value) - -@@ -242,9 +243,10 @@ let modify eref f = - - let unset (f, _, table as eref) = - match table with -- | Per t -> remove_persistent_data ~table:t () -+ | Per t -> t >>= fun t -> remove_persistent_data ~table:t () - | Ocsiper r -> r >>= fun r -> Ocsipersist.set r None - | Ocsiper_sit t -> -+ t >>= fun t -> - Ocsipersist.remove t (get_site_id ()) - | _ -> Lwt.return (Volatile.unset eref) - -@@ -258,6 +260,7 @@ module Ext = struct - match table with - | Vol _ -> Lwt.return (Volatile.Ext.get state r) - | Per t -> -+ t >>= fun t -> - (Lwt.catch - (fun () -> Eliom_state.Ext.Low_level.get_persistent_data - ~state ~table:t) -@@ -279,6 +282,7 @@ module Ext = struct - match table with - | Vol _ -> Lwt.return (Volatile.Ext.set state r value) - | Per t -> -+ t >>= fun t -> - Eliom_state.Ext.Low_level.set_persistent_data - ~state ~table:t value - | _ -> Lwt.fail (Failure "wrong eref for this function") -@@ -291,7 +295,7 @@ module Ext = struct - let state = Eliom_state.Ext.untype_state state in - match table with - | Vol _ -> Lwt.return (Volatile.Ext.unset state r) -- | Per t -> Eliom_state.Ext.Low_level.remove_persistent_data -+ | Per t -> t >>= fun t -> Eliom_state.Ext.Low_level.remove_persistent_data - ~state ~table:t - | _ -> failwith "wrong eref for this function" - -Index: eliom-5.0.0/src/lib/eliom_state.server.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_state.server.ml -+++ eliom-5.0.0/src/lib/eliom_state.server.ml -@@ -918,11 +918,11 @@ type 'a persistent_table = - bool * - (int64 * 'a) Ocsipersist.table) - --let create_persistent_table ~scope ?secure name : 'a persistent_table = -+let create_persistent_table ~scope ?secure name : 'a persistent_table Lwt.t = - let sitedata = Eliom_request_info.find_sitedata "create_persistent_table" in - let secure = Eliom_common.get_secure secure sitedata in -- let t = Eliom_common.create_persistent_table name in -- (scope, secure, t) -+ Eliom_common.create_persistent_table name >>= fun t -> -+ Lwt.return (scope, secure, t) - - let get_p_table_key_ - ~table:(scope, secure, table) -@@ -1271,10 +1271,8 @@ module Ext = struct - - let get_persistent_cookie_info - ((_, _, cookie) : ([< Eliom_common.cookie_level ], [ `Pers ]) state) = -- Ocsipersist.find -- (Lazy.force Eliommod_persess.persistent_cookies_table) -- cookie -- >>= fun v -> -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= fun table -> -+ Ocsipersist.find table cookie >>= fun v -> - Lwt.return (cookie, v) - - let discard_state ~state = -@@ -1487,10 +1485,8 @@ module Ext = struct - | None -> TNone - | Some t -> TSome t - in -- Ocsipersist.add -- (Lazy.force Eliom_common.persistent_cookies_table) -- cookie -- (fullstname, exp, ti, sessgrp) -+ Lazy.force Eliom_common.persistent_cookies_table >>= fun table -> -+ Ocsipersist.add table cookie (fullstname, exp, ti, sessgrp) - - let get_service_cookie_timeout ~cookie:(_, (_, _, _, r, _, _)) = - !r -@@ -1510,10 +1506,8 @@ module Ext = struct - - let unset_persistent_data_cookie_timeout - ~cookie:(cookie, (fullstname, exp, _, sessgrp)) = -- Ocsipersist.add -- (Lazy.force Eliom_common.persistent_cookies_table) -- cookie -- (fullstname, exp, TGlobal, sessgrp) -+ Lazy.force Eliom_common.persistent_cookies_table >>= fun table -> -+ Ocsipersist.add table cookie (fullstname, exp, TGlobal, sessgrp) - - - let get_session_group_list () = -Index: eliom-5.0.0/src/lib/eliom_state.server.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_state.server.mli -+++ eliom-5.0.0/src/lib/eliom_state.server.mli -@@ -1019,7 +1019,7 @@ val remove_volatile_data : - val create_persistent_table : - scope:Eliom_common.user_scope -> - ?secure:bool -> -- string -> 'a persistent_table -+ string -> 'a persistent_table Lwt.t - - (** gets persistent session data for the current persistent session (if any). - (low level) *) -Index: eliom-5.0.0/src/lib/server/eliommod_cookies.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/server/eliommod_cookies.ml -+++ eliom-5.0.0/src/lib/server/eliommod_cookies.ml -@@ -152,8 +152,7 @@ let get_cookie_info - lazy - (catch - (fun () -> -- Ocsipersist.find -- (Lazy.force Eliom_common.persistent_cookies_table) value >>= -+ Lazy.force Eliom_common.persistent_cookies_table >>= fun table -> Ocsipersist.find table value >>= - fun (full_state_name, persexp, perstimeout, sessgrp) -> - - Eliommod_sessiongroups.Pers.up value sessgrp >>= fun () -> -Index: eliom-5.0.0/src/lib/server/eliommod_gc.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/server/eliommod_gc.ml -+++ eliom-5.0.0/src/lib/server/eliommod_gc.ml -@@ -309,7 +309,8 @@ let persistent_session_gc sitedata = - (fun () -> - let now = Unix.time () in - Lwt_log.ign_info ~section "GC of persistent sessions"; -- (Ocsipersist.iter_table -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= -+ Ocsipersist.iter_table - (fun k ((scope, _, _), exp, _, session_group) -> - (match exp with - | Some exp when exp < now -> -@@ -320,8 +321,7 @@ let persistent_session_gc sitedata = - session_group k - (*WAS: remove_from_all_persistent_tables k *) - | _ -> return ()) -- ) -- (Lazy.force Eliommod_persess.persistent_cookies_table))) -+ )) - >>= - f - in ignore (f ()) -Index: eliom-5.0.0/src/lib/server/eliommod_pagegen.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/server/eliommod_pagegen.ml -+++ eliom-5.0.0/src/lib/server/eliommod_pagegen.ml -@@ -135,8 +135,9 @@ let update_cookie_table ?now sitedata (c - oldv = newc.Eliom_common.pc_value -> - catch - (fun () -> -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= fun table -> - Ocsipersist.replace_if_exists -- (Lazy.force Eliommod_persess.persistent_cookies_table) -+ table - newc.Eliom_common.pc_value - (name, - newexp, -@@ -147,8 +148,9 @@ let update_cookie_table ?now sitedata (c - (* someone else closed the session *) - | e -> fail e) - | _ -> -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= fun table -> - Ocsipersist.add -- (Lazy.force Eliommod_persess.persistent_cookies_table) -+ table - newc.Eliom_common.pc_value - (name, - newexp, -Index: eliom-5.0.0/src/lib/server/eliommod_persess.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/server/eliommod_persess.ml -+++ eliom-5.0.0/src/lib/server/eliommod_persess.ml -@@ -50,7 +50,7 @@ let number_of_persistent_table_elements - List.fold_left - (fun thr t -> - thr >>= fun l -> -- Ocsipersist.length (Ocsipersist.open_table t) >>= fun e -> -+ Ocsipersist.open_table t >>= fun table -> Ocsipersist.length table >>= fun e -> - return ((t, e)::l)) (return []) !perstables - - let close_persistent_state2 -@@ -141,8 +141,7 @@ let rec find_or_create_persistent_cookie - (* We do not need to verify if it already exists. - make_new_session_id does never generate twice the same cookie. *) - let usertimeout = ref Eliom_common.TGlobal (* See global table *) in -- Ocsipersist.add -- (Lazy.force persistent_cookies_table) c -+ Lazy.force persistent_cookies_table >>= fun table -> Ocsipersist.add table c - (full_st_name, - None (* Some 0. *) (* exp on server - We'll change it later *), - Eliom_common.TGlobal (* timeout - see global config *), -Index: eliom-5.0.0/src/lib/server/eliommod_persess.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/server/eliommod_persess.mli -+++ eliom-5.0.0/src/lib/server/eliommod_persess.mli -@@ -22,7 +22,7 @@ val perstables : string list ref - val persistent_cookies_table : - (Eliom_common.full_state_name * float option * Eliom_common.timeout * - Eliom_common.perssessgrp option) -- Ocsipersist.table Lazy.t -+ Ocsipersist.table Lwt.t Lazy.t - val number_of_persistent_tables : unit -> int - val number_of_persistent_table_elements : unit -> (string * int) list Lwt.t - val close_persistent_state2 : -Index: eliom-5.0.0/src/lib/server/eliommod_sessadmin.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/server/eliommod_sessadmin.ml -+++ eliom-5.0.0/src/lib/server/eliommod_sessadmin.ml -@@ -94,6 +94,7 @@ let close_all_data_states ~scope ~secure - - - let close_all_persistent_states2 full_st_name sitedata = -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= - Ocsipersist.iter_table - (fun k ((scope, _, _) as full_st_name2, old_exp, old_t, sessiongrp) -> - if full_st_name = full_st_name2 && old_t = Eliom_common.TGlobal -@@ -102,7 +103,6 @@ let close_all_persistent_states2 full_st - Lwt_unix.yield - else return () - ) -- (Lazy.force Eliommod_persess.persistent_cookies_table) - - (** Close all persistent sessions for one session name. - If the optional parameter [?state_name] (session name) is not present, -@@ -195,6 +195,7 @@ let update_pers_exp full_st_name sitedat - close_all_persistent_states2 full_st_name sitedata - | _ -> - let now = Unix.time () in -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= fun table -> - Ocsipersist.iter_table - (fun k ((scope, _, _) as full_st_name2, old_exp, old_t, sessgrp) -> - if full_st_name = full_st_name2 && old_t = -@@ -211,11 +212,7 @@ let update_pers_exp full_st_name sitedat - Eliommod_persess.close_persistent_state2 - ~scope sitedata sessgrp k - | _ -> -- Ocsipersist.add -- (Lazy.force Eliommod_persess.persistent_cookies_table) -- k -- (full_st_name2, newexp, -- Eliom_common.TGlobal, sessgrp) >>= Lwt_unix.yield -+ Ocsipersist.add table k (full_st_name2, newexp, Eliom_common.TGlobal, sessgrp) >>= Lwt_unix.yield - else return () - ) -- (Lazy.force Eliommod_persess.persistent_cookies_table) -+ table -Index: eliom-5.0.0/src/lib/server/eliommod_sessexpl.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/server/eliommod_sessexpl.ml -+++ eliom-5.0.0/src/lib/server/eliommod_sessexpl.ml -@@ -57,12 +57,12 @@ let iter_data_cookies f = - - (** Iterator on persistent cookies *) - let iter_persistent_cookies f = -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= - Ocsipersist.iter_table - (fun k v -> - f (k, v) >>= - Lwt_unix.yield - ) -- (Lazy.force Eliommod_persess.persistent_cookies_table) - - - (** Iterator on service cookies *) -@@ -94,13 +94,14 @@ let fold_data_cookies f beg = - - (** Iterator on persistent cookies *) - let fold_persistent_cookies f beg = -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= fun table -> - Ocsipersist.fold_table - (fun k v beg -> - f (k, v) beg >>= fun res -> - Lwt_unix.yield () >>= fun () -> - return res - ) -- (Lazy.force Eliommod_persess.persistent_cookies_table) -+ table - beg - - (*****************************************************************************) -@@ -121,4 +122,4 @@ let number_of_table_elements () = - List.map (fun f -> f ()) !Eliommod_datasess.counttableelements - - let number_of_persistent_cookies () = -- Ocsipersist.length (Lazy.force Eliommod_persess.persistent_cookies_table) -+ Lazy.force Eliommod_persess.persistent_cookies_table >>= Ocsipersist.length -Index: eliom-5.0.0/src/lib/server/eliommod_sessiongroups.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/server/eliommod_sessiongroups.ml -+++ eliom-5.0.0/src/lib/server/eliommod_sessiongroups.ml -@@ -413,7 +413,7 @@ module Pers = struct - (*VVV Verify this carefully! *) - (*VVV VEOcsigen_request_infoFY concurrent access *) - -- let grouptable : (nbmax * string list) Ocsipersist.table Lazy.t = -+ let grouptable : (nbmax * string list) Ocsipersist.table Lwt.t Lazy.t = - lazy (Ocsipersist.open_table "__eliom_session_group_table") - (* It is lazy because if the module is linked statically, - the creation of the table must happen after initialisation -@@ -426,7 +426,7 @@ module Pers = struct - | Some g -> - Lwt.catch - (fun () -> -- Ocsipersist.find !!grouptable -+ !!grouptable >>= fun grouptable -> Ocsipersist.find grouptable - (Eliom_common.string_of_perssessgrp g) >>= fun (_, a) -> - Lwt.return a) - (function -@@ -439,7 +439,7 @@ module Pers = struct - let sg = Eliom_common.string_of_perssessgrp sg in - Lwt.catch - (fun () -> -- Ocsipersist.find !!grouptable sg >>= fun (max2, cl) -> -+ !!grouptable >>= fun grouptable -> Ocsipersist.find grouptable sg >>= fun (max2, cl) -> - let max, newmax = match set_max with - | None -> ((match max2 with - | Default -> defaultmax -@@ -449,7 +449,7 @@ module Pers = struct - | Some (Some v) -> Some v, Val v - in - let cl, toclose = cut max cl in -- Ocsipersist.replace_if_exists !!grouptable sg (newmax, (sess_id::cl)) -+ Ocsipersist.replace_if_exists grouptable sg (newmax, (sess_id::cl)) - >>= fun () -> - Lwt.return toclose) - (function -@@ -459,7 +459,7 @@ module Pers = struct - | Some None -> Nolimit - | Some (Some v) -> Val v - in -- Ocsipersist.add !!grouptable sg (max, [sess_id]) >>= fun () -> -+ !!grouptable >>= fun grouptable -> Ocsipersist.add grouptable sg (max, [sess_id]) >>= fun () -> - Lwt.return [] - | e -> Lwt.fail e) - | None -> Lwt.return [] -@@ -502,8 +502,7 @@ module Pers = struct - belonging to the group grp *) - (* group_name is the cookie value *) - remove sitedata group_name grp >>= fun () -> -- Ocsipersist.remove -- (!!Eliom_common.persistent_cookies_table) group_name -+ !!Eliom_common.persistent_cookies_table >>= fun table -> Ocsipersist.remove table group_name - | _ -> Lwt.return ()) - >>= fun () -> - -@@ -511,7 +510,7 @@ module Pers = struct - match sess_grp with - | Some sg -> - let sg = Eliom_common.string_of_perssessgrp sg in -- Ocsipersist.remove !!grouptable sg -+ !!grouptable >>= fun grouptable -> Ocsipersist.remove grouptable sg - | None -> Lwt.return () - ) - (function Not_found -> Lwt.return () | e -> Lwt.fail e) -@@ -526,7 +525,7 @@ module Pers = struct - match cookie_level with - | `Client_process -> begin - (* We remove cookie info from the table *) -- Ocsipersist.remove (!!Eliom_common.persistent_cookies_table) cookie -+ !!Eliom_common.persistent_cookies_table >>= fun table -> Ocsipersist.remove table cookie - >>= fun () -> - - (* We remove the session from its group: *) -@@ -555,7 +554,7 @@ module Pers = struct - let sg = Eliom_common.string_of_perssessgrp sg0 in - Lwt.catch - (fun () -> -- Ocsipersist.find !!grouptable sg >>= fun (max, cl) -> -+ !!grouptable >>= fun grouptable -> Ocsipersist.find grouptable sg >>= fun (max, cl) -> - let newcl = List.remove_first_if_any sess_id cl in - (match newcl with - | [] -> -@@ -570,8 +569,8 @@ module Pers = struct - remove_group ~cookie_level:`Session sitedata sess_grp - | _ -> Lwt.return () - ) >>= fun () -> -- Ocsipersist.remove !!grouptable sg -- | _ -> Ocsipersist.replace_if_exists !!grouptable sg (max, newcl) -+ Ocsipersist.remove grouptable sg -+ | _ -> Ocsipersist.replace_if_exists grouptable sg (max, newcl) - ) - ) - (function -@@ -586,9 +585,9 @@ module Pers = struct - let sg = Eliom_common.string_of_perssessgrp sg in - Lwt.catch - (fun () -> -- Ocsipersist.find !!grouptable sg >>= fun (max, cl) -> -+ !!grouptable >>= fun grouptable -> Ocsipersist.find grouptable sg >>= fun (max, cl) -> - let newcl = List.remove_first_if_any sess_id cl in -- Ocsipersist.replace_if_exists !!grouptable sg (max, sess_id::newcl) -+ Ocsipersist.replace_if_exists grouptable sg (max, sess_id::newcl) - ) - (function - | Not_found -> Lwt.return () -@@ -601,6 +600,6 @@ module Pers = struct - end - else Lwt.return [] - -- let nb_of_groups () = Ocsipersist.length !!grouptable -+ let nb_of_groups () = !!grouptable >>= Ocsipersist.length - - end diff --git a/dev-ml/eliom/files/reactivedata.patch b/dev-ml/eliom/files/reactivedata.patch deleted file mode 100644 index 190df85cfa1ba..0000000000000 --- a/dev-ml/eliom/files/reactivedata.patch +++ /dev/null @@ -1,44 +0,0 @@ -Index: eliom-5.0.0/src/lib/eliom_shared.eliom -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_shared.eliom -+++ eliom-5.0.0/src/lib/eliom_shared.eliom -@@ -288,7 +288,7 @@ module FakeReactiveData = struct - val concat : 'a t -> 'a t -> 'a t - val value : 'a t -> 'a list - val synced : 'a t -> bool -- val signal : 'a t -> 'a list FakeReact.S.t -+ val signal : ?eq:('a -> 'a -> bool) -> 'a t -> 'a list FakeReact.S.t - val singleton_s : 'a FakeReact.S.t -> 'a t - val map : ('a -> 'b) -> 'a t -> 'b t - val from_signal : -@@ -304,7 +304,7 @@ module FakeReactiveData = struct - let singleton_s s = [FakeReact.S.value s], FakeReact.S.synced s - let value (l, _) = l - let synced (_, b) = b -- let signal (l, synced) = fst (FakeReact.S.create ~synced l) -+ let signal ?eq (l, synced) = fst (FakeReact.S.create ~synced l) - let map f (l, b) = List.map f l, b - let from_signal ?eq s = FakeReact.S.(value s, synced s) - module Lwt = struct -@@ -635,7 +635,7 @@ module ReactiveData = struct - let value (s : 'a t) = {shared# 'a list { - FakeReactiveData.RList.value (Value.local %s) }} - -- let signal (s : 'a t) = {shared# 'a list FakeReact.S.t { -+ let signal ?eq (s : 'a t) = {shared# 'a list FakeReact.S.t { - FakeReactiveData.RList.signal (Value.local %s) }} - - let map f s = {shared# 'a FakeReactiveData.RList.t { -Index: eliom-5.0.0/src/lib/eliom_shared_sigs.shared.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_shared_sigs.shared.mli -+++ eliom-5.0.0/src/lib/eliom_shared_sigs.shared.mli -@@ -143,7 +143,7 @@ module type RLIST = sig - - val concat : 'a t -> 'a t -> 'a t - val value : 'a t -> 'a list Eliom_lib.shared_value -- val signal : 'a t -> 'a list signal -+ val signal : ?eq:(('a -> 'a -> bool)) -> 'a t -> 'a list signal - val singleton_s : 'a signal -> 'a t - val map : ('a -> 'b) Eliom_lib.shared_value -> 'a t -> 'b t - val from_signal : diff --git a/dev-ml/eliom/files/tyxml4.patch b/dev-ml/eliom/files/tyxml4.patch deleted file mode 100644 index bf749e4f3ad0e..0000000000000 --- a/dev-ml/eliom/files/tyxml4.patch +++ /dev/null @@ -1,1642 +0,0 @@ -Index: eliom-5.0.0/src/lib/eliom_content.client.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content.client.mli -+++ eliom-5.0.0/src/lib/eliom_content.client.mli -@@ -292,7 +292,7 @@ module Html5 : sig - See {% <> %} *) - - (** Cf. {% <> %}. *) -- module Raw : Html5_sigs.Make(Xml)(Svg.F.Raw).T -+ module Raw : Html_sigs.Make(Xml)(Svg.F.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -@@ -313,7 +313,7 @@ module Html5 : sig - See {% <> %} *) - - (** Cf. {% <> %}. *) -- module Raw : Html5_sigs.Make(Xml)(Svg.D.Raw).T -+ module Raw : Html_sigs.Make(Xml)(Svg.D.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -@@ -352,7 +352,7 @@ module Html5 : sig - val filter_attrib : 'a attrib -> bool React.signal -> 'a attrib - - (** Cf. {% <> %}. *) -- module Raw : Html5_sigs.Make(Eliom_content_core.Xml_wed)(Svg.R.Raw).T -+ module Raw : Html_sigs.Make(Eliom_content_core.Xml_wed)(Svg.R.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -Index: eliom-5.0.0/src/lib/eliom_content.server.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content.server.mli -+++ eliom-5.0.0/src/lib/eliom_content.server.mli -@@ -309,7 +309,7 @@ module Html5 : sig - {{:http://ocsigen.org/howto/forms/}"how to make forms"} *) - - (** See {% <> %}. *) -- module Raw : Html5_sigs.Make(Xml)(Svg.F.Raw).T -+ module Raw : Html_sigs.Make(Xml)(Svg.F.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -@@ -337,7 +337,7 @@ module Html5 : sig - {{:http://ocsigen.org/howto/forms/}"how to make forms"} *) - - (** See {% <> %}. *) -- module Raw : Html5_sigs.Make(Xml)(Svg.D.Raw).T -+ module Raw : Html_sigs.Make(Xml)(Svg.D.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -@@ -406,7 +406,7 @@ module Html5 : sig - {% <> %}. *) - module R : sig - -- include Html5_sigs.Make(Xml_shared)(Svg.R.Raw).T -+ include Html_sigs.Make(Xml_shared)(Svg.R.Raw).T - with type 'a elt = 'a elt - and type 'a attrib = 'a attrib - -@@ -414,7 +414,7 @@ module Html5 : sig - [\[> Html5_types.span\] elt] - out of the string signal [s]. *) - val pcdata : -- string Eliom_shared.React.S.t -> [> Html5_types.span] elt -+ string Eliom_shared.React.S.t -> [> Html_types.span] elt - - (** [node s] produces an ['a elt] out of the shared reactive - signal [s]. *) -Index: eliom-5.0.0/src/lib/eliom_content_core.client.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_core.client.ml -+++ eliom-5.0.0/src/lib/eliom_content_core.client.ml -@@ -175,7 +175,7 @@ end - - module Xml_wed = - struct -- module W = Tyxml_js.Xml_wrap -+ module W = Tyxml_js.Wrap - type 'a wrap = 'a W.t - type 'a list_wrap = 'a W.tlist - type uri = Xml.uri -@@ -188,7 +188,7 @@ struct - type attrib = Xml.attrib - - let float_attrib name s : attrib = -- name, Xml.RAReact (Tyxml_js.Xml_wrap.fmap (fun f -> Some (Xml.AFloat f)) s) -+ name, Xml.RAReact (Tyxml_js.Wrap.fmap (fun f -> Some (Xml.AFloat f)) s) - let int_attrib name s = - name, Xml.RAReact (React.S.map (fun f -> Some (Xml.AInt f)) s) - let string_attrib name s = -@@ -320,7 +320,7 @@ module Html5 = struct - let lazy_node ?(a = []) name children = - make (Node (name, a, Eliom_lazy.force children)) - end -- module Raw = Html5_f.Make(Xml')(Svg.D.Raw) -+ module Raw = Html_f.Make(Xml')(Svg.D.Raw) - - include Raw - -@@ -340,7 +340,7 @@ module Html5 = struct - - let node s = Xml.make_react s - -- module Raw = Html5_f.Make(Xml_wed)(Svg.R) -+ module Raw = Html_f.Make(Xml_wed)(Svg.R) - let filter_attrib (name,a) on = - let v = match a with - | Xml.RA a -> Xml.RAReact (React.S.map (function -@@ -365,7 +365,7 @@ module Html5 = struct - module F = struct - - module Xml' = Xml -- module Raw = Html5_f.Make(Xml')(Svg.F.Raw) -+ module Raw = Html_f.Make(Xml')(Svg.F.Raw) - include Raw - - type ('a, 'b, 'c) lazy_star = -Index: eliom-5.0.0/src/lib/eliom_content_core.client.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_core.client.mli -+++ eliom-5.0.0/src/lib/eliom_content_core.client.mli -@@ -22,7 +22,10 @@ - - module Xml : sig - -- module W : Xml_wrap.T with type 'a t = 'a and type 'a tlist = 'a list -+ module W : Xml_wrap.T -+ with type 'a t = 'a -+ and type 'a tlist = 'a list -+ and type (-'a, 'b) ft = 'a -> 'b - - type uri = string - val uri_of_string : uri -> string -@@ -153,7 +156,7 @@ end - - module Xml_wed : sig - -- include Xml_sigs.T with module W = Tyxml_js.Xml_wrap -+ include Xml_sigs.T with module W = Tyxml_js.Wrap - and type elt = Xml.elt - and type aname = Xml.aname - and type attrib = Xml.attrib -@@ -281,7 +284,7 @@ module Html5 : sig - See {% <> %}. *) - module F : sig - -- module Raw : Html5_sigs.Make(Xml)(Svg.F.Raw).T -+ module Raw : Html_sigs.Make(Xml)(Svg.F.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -@@ -293,7 +296,7 @@ module Html5 : sig - ?a: (('a attrib) list) -> ('b elt) list Eliom_lazy.request -> 'c elt - - val lazy_form: -- ([< Html5_types.form_attrib ], [< Html5_types.form_content_fun ], [> Html5_types.form ]) lazy_star -+ ([< Html_types.form_attrib ], [< Html_types.form_content_fun ], [> Html_types.form ]) lazy_star - - end - -@@ -302,7 +305,7 @@ module Html5 : sig - {% <> %}. *) - module D: sig - -- module Raw : Html5_sigs.Make(Xml)(Svg.D.Raw).T -+ module Raw : Html_sigs.Make(Xml)(Svg.D.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -@@ -313,7 +316,7 @@ module Html5 : sig - ?a: (('a attrib) list) -> ('b elt) list Eliom_lazy.request -> 'c elt - - val lazy_form: -- ([< Html5_types.form_attrib ], [< Html5_types.form_content_fun ], [> Html5_types.form ]) lazy_star -+ ([< Html_types.form_attrib ], [< Html_types.form_content_fun ], [> Html_types.form ]) lazy_star - - end - -@@ -332,7 +335,7 @@ module Html5 : sig - - val filter_attrib : 'a attrib -> bool React.signal -> 'a attrib - -- module Raw : Html5_sigs.Make(Xml_wed)(Svg.R.Raw).T -+ module Raw : Html_sigs.Make(Xml_wed)(Svg.R.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -Index: eliom-5.0.0/src/lib/eliom_content_core.server.ml -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_core.server.ml -+++ eliom-5.0.0/src/lib/eliom_content_core.server.ml -@@ -289,8 +289,7 @@ module Svg = struct - module Make - (Xml : Xml_sigs.T with type elt = Xml.elt - and type attrib = Xml.attrib) -- (C : Svg_sigs.Wrapped_functions -- with type ('a, 'b) ft = ('a, 'b) Xml.W.ft) = -+ (C : Svg_sigs.Wrapped_functions with module Xml = Xml) = - Svg_f.Make_with_wrapped_functions(Xml)(C) - - type +'a elt = 'a F.elt -@@ -341,7 +340,7 @@ module Html5 = struct - - end - -- module Raw = Html5_f.Make(Xml')(Svg.D.Raw) -+ module Raw = Html_f.Make(Xml')(Svg.D.Raw) - let client_attrib ?init (x : 'a Raw.attrib Eliom_lib.client_value) = - Xml.client_attrib ?init x - -@@ -359,7 +358,7 @@ module Html5 = struct - module F = struct - - module Xml' = Xml -- module Raw = Html5_f.Make(Xml')(Svg.F.Raw) -+ module Raw = Html_f.Make(Xml')(Svg.F.Raw) - include Raw - - type ('a, 'b, 'c) lazy_star = -@@ -376,10 +375,9 @@ module Html5 = struct - (Xml : Xml_sigs.T - with type elt = Xml.elt - and type attrib = Xml.attrib) -- (C : Html5_sigs.Wrapped_functions -- with type ('a, 'b) ft = ('a, 'b) Xml.W.ft) -+ (C : Html_sigs.Wrapped_functions with module Xml = Xml) - (Svg : Svg_sigs.T with module Xml := Xml) = -- Html5_f.Make_with_wrapped_functions(Xml)(C)(Svg) -+ Html_f.Make_with_wrapped_functions(Xml)(C)(Svg) - - type +'a elt = 'a F.elt - type 'a wrap = 'a -Index: eliom-5.0.0/src/lib/eliom_content_core.server.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_core.server.mli -+++ eliom-5.0.0/src/lib/eliom_content_core.server.mli -@@ -116,8 +116,7 @@ module Svg : sig - (Xml : Xml_sigs.T - with type elt = Xml.elt - and type attrib = Xml.attrib) -- (C : Svg_sigs.Wrapped_functions -- with type ('a, 'b) ft = ('a, 'b) Xml.W.ft) : -+ (C : Svg_sigs.Wrapped_functions with module Xml = Xml) : - Svg_sigs.Make(Xml).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib -@@ -156,7 +155,7 @@ module Html5 : sig - - module F : sig - -- module Raw : Html5_sigs.Make(Xml)(Svg.F.Raw).T -+ module Raw : Html_sigs.Make(Xml)(Svg.F.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -@@ -167,12 +166,12 @@ module Html5 : sig - ?a: (('a attrib) list) -> ('b elt) list Eliom_lazy.request -> 'c elt - - val lazy_form: -- ([< Html5_types.form_attrib ], [< Html5_types.form_content_fun ], [> Html5_types.form ]) lazy_star -+ ([< Html_types.form_attrib ], [< Html_types.form_content_fun ], [> Html_types.form ]) lazy_star - end - - module D : sig - -- module Raw : Html5_sigs.Make(Xml)(Svg.D.Raw).T -+ module Raw : Html_sigs.Make(Xml)(Svg.D.Raw).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -@@ -185,7 +184,7 @@ module Html5 : sig - ?a: (('a attrib) list) -> ('b elt) list Eliom_lazy.request -> 'c elt - - val lazy_form: -- ([< Html5_types.form_attrib ], [< Html5_types.form_content_fun ], [> Html5_types.form ]) lazy_star -+ ([< Html_types.form_attrib ], [< Html_types.form_content_fun ], [> Html_types.form ]) lazy_star - - end - -@@ -193,10 +192,9 @@ module Html5 : sig - (Xml : Xml_sigs.T - with type elt = Xml.elt - and type attrib = Xml.attrib) -- (C : Html5_sigs.Wrapped_functions -- with type ('a, 'b) ft = ('a, 'b) Xml.W.ft) -+ (C : Html_sigs.Wrapped_functions with module Xml = Xml) - (Svg : Svg_sigs.T with module Xml := Xml) : -- Html5_sigs.Make(Xml)(Svg).T -+ Html_sigs.Make(Xml)(Svg).T - with type +'a elt = 'a elt - and type +'a attrib = 'a attrib - -Index: eliom-5.0.0/src/lib/eliom_content_sigs.shared.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_content_sigs.shared.mli -+++ eliom-5.0.0/src/lib/eliom_content_sigs.shared.mli -@@ -31,9 +31,9 @@ module type LINKS_AND_FORMS = sig - 'c elt - - val lazy_form: -- ([< Html5_types.form_attrib ], -- [< Html5_types.form_content_fun ], -- [> Html5_types.form ]) lazy_star -+ ([< Html_types.form_attrib ], -+ [< Html_types.form_content_fun ], -+ [> Html_types.form ]) lazy_star - - include Eliom_form_sigs.LINKS - with type +'a elt := 'a elt -Index: eliom-5.0.0/src/lib/eliom_form.eliom -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_form.eliom -+++ eliom-5.0.0/src/lib/eliom_form.eliom -@@ -21,7 +21,7 @@ - {shared{ - module type Html5 = sig - -- include Html5_sigs.T -+ include Html_sigs.T - with type 'a Xml.W.t = 'a - and type 'a Xml.W.tlist = 'a list - and type Xml.mouse_event_handler = -@@ -33,9 +33,9 @@ module type Html5 = sig - 'c elt - - val lazy_form: -- ([< Html5_types.form_attrib ], -- [< Html5_types.form_content_fun ], -- [> Html5_types.form ]) lazy_star -+ ([< Html_types.form_attrib ], -+ [< Html_types.form_content_fun ], -+ [> Html_types.form ]) lazy_star - - val uri_of_fun : (unit -> string) -> Xml.uri - -@@ -44,7 +44,7 @@ module type Html5 = sig - ([ `A | `Form_get | `Form_post] * - (bool * string list) option * - string option) option Eliom_lazy.request -> -- Html5_types.form_attrib attrib -+ Html_types.form_attrib attrib - - end - -@@ -174,7 +174,7 @@ module Make (Html5 : Html5) = struct - | None -> a - | Some src -> a_src src :: a - in -- let a = if checked then a_checked `Checked :: a else a in -+ let a = if checked then a_checked () :: a else a in - let a = a_input_type typ :: a in - input ~a () - -@@ -194,7 +194,7 @@ module Make (Html5 : Html5) = struct - textarea ~a (pcdata value) - - let make_select ?(a = []) ~multiple ~name elt elts = -- let a = if multiple then a_multiple `Multiple :: a else a in -+ let a = if multiple then a_multiple () :: a else a in - let a = a_name name :: a in - select ~a (elt :: elts) - -@@ -203,7 +203,7 @@ module Make (Html5 : Html5) = struct - | None -> a - | Some v -> a_text_value v :: a - in -- let a = if selected then a_selected `Selected :: a else a in -+ let a = if selected then a_selected () :: a else a in - option ~a c - - let make_optgroup ?(a = []) ~label elt elts = -@@ -364,7 +364,7 @@ module Make (Html5 : Html5) = struct - - let string_radio_required ?a ?checked ~name ~value () = - let a = -- let required = Html5.a_required `Required in -+ let required = Html5.a_required () in - match a with - | None -> [required] - | Some a -> required :: a -@@ -385,14 +385,14 @@ module Make (Html5 : Html5) = struct - make_textarea ?a ~name:(Eliom_parameter.string_of_param_name name) - - type 'a soption = -- Html5_types.option_attrib attrib list -+ Html_types.option_attrib attrib list - * 'a (* Content (or value if the following is present) *) -- * Html5_types.pcdata elt option (* if content different from value *) -+ * Html_types.pcdata elt option (* if content different from value *) - * bool (* selected *) - - type 'a select_opt = - | Optgroup of -- [ Html5_types.common | `Disabled ] attrib list -+ [ Html_types.common | `Disabled ] attrib list - * string (* label *) - * 'a soption - * 'a soption list -@@ -404,7 +404,7 @@ module Make (Html5 : Html5) = struct - let a = match required with - | None -> a - | Some _ -> -- let required = Html5.a_required `Required in -+ let required = Html5.a_required () in - match a with - | Some a -> Some (required :: a) - | None -> Some [required] -Index: eliom-5.0.0/src/lib/eliom_form.eliomi -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_form.eliomi -+++ eliom-5.0.0/src/lib/eliom_form.eliomi -@@ -22,7 +22,7 @@ - - module type Html5 = sig - -- include Html5_sigs.T -+ include Html_sigs.T - with type 'a Xml.W.t = 'a - and type 'a Xml.W.tlist = 'a list - and type Xml.mouse_event_handler = -@@ -34,9 +34,9 @@ module type Html5 = sig - 'c elt - - val lazy_form : -- ([< Html5_types.form_attrib ], -- [< Html5_types.form_content_fun ], -- [> Html5_types.form ]) lazy_star -+ ([< Html_types.form_attrib ], -+ [< Html_types.form_content_fun ], -+ [> Html_types.form ]) lazy_star - - val uri_of_fun : (unit -> string) -> Xml.uri - -@@ -45,7 +45,7 @@ module type Html5 = sig - ([ `A | `Form_get | `Form_post] * - (bool * string list) option * - string option) option Eliom_lazy.request -> -- Html5_types.form_attrib attrib -+ Html_types.form_attrib attrib - - end - -Index: eliom-5.0.0/src/lib/eliom_form_sigs.shared.mli -=================================================================== ---- eliom-5.0.0.orig/src/lib/eliom_form_sigs.shared.mli -+++ eliom-5.0.0/src/lib/eliom_form_sigs.shared.mli -@@ -136,8 +136,8 @@ module type LINKS = sig - The optional parameter [~a] allows one to add extra HTML - attributes to the generated node. *) - val css_link : -- ?a:Html5_types.link_attrib attrib list -> -- uri:uri -> unit -> [> Html5_types.link] elt -+ ?a:Html_types.link_attrib attrib list -> -+ uri:uri -> unit -> [> Html_types.link] elt - - (** The function [js_script ~uri ()] creates a [