Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[cleanup] opabsl: removed redefinition warnings

  • Loading branch information...
commit 6d0933df8023a2b25d66fe9b61eb3b2388c9eedb 1 parent 18ed668
Louis Gesbert authored
View
2  opabsl/jsbsl/bslCanvas.js
@@ -16,8 +16,6 @@
along with OPA. If not, see <http://www.gnu.org/licenses/>.
*/
-##opa-type Dom.private.element
-
##extern-type Canvas.context
##extern-type Canvas.pattern
##extern-type Canvas.gradient
View
1  opabsl/jsbsl/bslClosure.js
@@ -22,7 +22,6 @@
*/
##extern-type Closure.t
##extern-type Closure.args
-##extern-type continuation('a)
var global = this;
View
2  opabsl/mlbsl/bsl-sources
@@ -10,6 +10,7 @@ bslResourceTracker.ml
bslAppSrcCode.ml
bool.ml
+bslTime.ml
bslNet.ml
bslClosure.ml
bslCps.ml
@@ -24,7 +25,6 @@ bslCactutf.ml
bslCrypto.ml
bslFile.ml
bslMail.ml
-bslTime.ml
bslReference.ml
bslNumber.ml
View
1  opabsl/mlbsl/bslClosure.ml
@@ -17,7 +17,6 @@
*)
##extern-type Closure.args = QmlClosureRuntime.AnyArray.t
##extern-type Closure.t = QmlClosureRuntime.t
-##extern-type continuation('a) = 'a QmlCpsServerLib.continuation
##module Args
##register create \ `QmlClosureRuntime.AnyArray.create` : int -> Closure.args
View
5 opabsl/mlbsl/bslNativeLib.ml
@@ -173,3 +173,8 @@ let opa_tuple_4 (a, b, c, d) =
ServerLib.make_record acc
in
wrap_opa_tuple_4 record
+
+(**
+ {1 Continuations}
+*)
+##extern-type continuation('a) = 'a QmlCpsServerLib.continuation
View
6 opabsl/mlbsl/bslNet.ml
@@ -20,7 +20,6 @@ module List = BaseList
(* The opa scheduler *)
let default_scheduler = BslScheduler.opa
-##extern-type continuation('a) = 'a QmlCpsServerLib.continuation
##extern-type web_server_status = Requestdef.status
##extern-type WebInfo.private.native_request = HttpServerTypes.request
##extern-type WebInfo.private.native_post_body_list = HttpServerTypes.post_body list
@@ -28,7 +27,6 @@ let default_scheduler = BslScheduler.opa
##extern-type WebInfo.private.native = HttpServerTypes.web_info
##extern-type WebInfo.private.native_connection = Scheduler.connection_info
##extern-type buffer = Buffer.t
-##extern-type time_t = int
##extern-type HttpRequest.multipart = HttpServerTypes.post_body list
##extern-type HttpRequest.payload = HttpServerCore.payload
##extern-type HttpRequest.msg_list = HttpServerCore_parse.msg list
@@ -149,7 +147,9 @@ let default_scheduler = BslScheduler.opa
let make_response_req expires r stat s1 s2 =
HttpServer.make_response_req (Time.milliseconds expires) r stat s1 (Http_common.Result s2)
- ##register make_response_req_loc : time_t, string, WebInfo.private.native_request, web_server_status, string, string -> WebInfo.private.native_response
+ ##register make_response_req_loc : \
+ time_t, string, WebInfo.private.native_request, web_server_status, string, string \
+ -> WebInfo.private.native_response
let make_response_req_loc expires url r stat s1 s2 =
HttpServer.make_response_req_loc (Time.milliseconds expires) url r stat s1 (Http_common.Result s2)
View
2  opabsl/mlbsl/bslSession.ml
@@ -33,8 +33,6 @@ type json = JS.json
let unserialize_uu = BslPingRegister.unserialize_uu
let serialize_uu = BslPingRegister.serialize_uu
-##extern-type RPC.Json.private.native = JsonTypes.json
-
(**********************************************************)
View
3  opabsl/mlbsl/bslUtils.ml
@@ -37,9 +37,6 @@ let rclient x = ServerLib.make_record (ServerLib.add_field ServerLib.empty_reco
let rserver x = ServerLib.make_record (ServerLib.add_field ServerLib.empty_record_constructor (fserver) x)
let rnothing = ServerLib.make_record (ServerLib.add_field ServerLib.empty_record_constructor (fnone) (ServerLib.make_record ServerLib.empty_record_constructor))
-
-##extern-type continuation('a) = 'a QmlCpsServerLib.continuation
-
##opa-type ThreadContext.t
##opa-type ThreadContext.client
View
26 opabsl/mlbsl/path.ml
@@ -61,33 +61,26 @@ let ( @* ) f g x = f(g(x))
(* -- Some conversion helpers -- *)
-(* Manual conversion for the cases where the BSL can't convert (value passed to a cont...) *)
-##opa-type list('a)
-
+let nil_record = ServerLib.make_simple_record (BslNativeLib.field_nil)
let qml_nil () =
- let record =
- ServerLib.make_simple_record (Option.get (ServerLib.field_of_name "nil"))
- in wrap_opa_list record
+ BslNativeLib.wrap_opa_list nil_record
let qml_cons x l =
let record =
ServerLib.make_record
(ServerLib.add_field
- (ServerLib.add_field ServerLib.empty_record_constructor
- (Option.get (ServerLib.field_of_name "hd")) x)
- (Option.get (ServerLib.field_of_name "tl")) l)
- in wrap_opa_list record
-
-##opa-type tuple_2('a,'b)
+ (ServerLib.add_field ServerLib.empty_record_constructor BslNativeLib.field_hd x)
+ BslNativeLib.field_tl l)
+ in BslNativeLib.wrap_opa_list record
let qml_pair x y =
let record =
ServerLib.make_record
(ServerLib.add_field
(ServerLib.add_field ServerLib.empty_record_constructor
- (Option.get (ServerLib.field_of_name "f1")) x)
- (Option.get (ServerLib.field_of_name "f2")) y)
- in wrap_opa_tuple_2 record
+ BslNativeLib.f1 x)
+ BslNativeLib.f2 y)
+ in BslNativeLib.wrap_opa_tuple_2 record
(* We need to handle map types (with values passed to dbgen) *)
##opa-type map('keys,'values)
@@ -244,7 +237,7 @@ let stringmap_fold_range t f acc start end_opt filter k =
let search key2val words t k =
let words = Cactutf.lowercase words in
- let words = Base.String.slice_chars " \t,.'" words in
+ let words = Base.String.slice_chars " \t,." words in
let words = List.map Base.String.trim words in
let words = List.filter ((<>) "") words in
get_trans t @> C.ccont_ml k
@@ -376,7 +369,6 @@ let history t pos len k = match t with
(post_filter revisions)
@> k
-##extern-type time_t = int (* FIXME, how to use this type from byTime? *)
##register[cps-bypass] history_time: t(ref_p, 'a), time_t, time_t, continuation(opa[list(tuple_2('a,time_t))]) -> void
(* todo optimise with a low-level filter: now it gets all revs before filtering *)
let history_time t from until k = match t with
Please sign in to comment.
Something went wrong with that request. Please try again.