Browse files

[cleanup] bsl: unused pervasives functions

  • Loading branch information...
1 parent c5d1e28 commit 64d71ea3fabb0e2a26c65a21c16069e3f496f06f Raja committed with Thomas Refis Sep 13, 2011
Showing with 2 additions and 42 deletions.
  1. +2 −13 opabsl/jsbsl/bslPervasives.js
  2. +0 −29 opabsl/mlbsl/bslPervasives.ml
View
15 opabsl/jsbsl/bslPervasives.js
@@ -159,15 +159,6 @@ function string_of_float(v) {
}
-/**
- * Determine if the code is executed server-side
- *
- * @return false in this implementation
- */
-##register webutils_server_side : -> bool
-##args()
-{ return false; }
-
/**
* dummy implementation, it's for tests.
@@ -370,13 +361,10 @@ if(typeof window != "object" || command_line_execution)//If we're not in a brows
* {1 Printing}
*/
-##register println_float \ print_endline : float -> void
-##register println_int \ print_endline : int -> void
##register print_endline \ print_endline : string -> void
##register prerr_endline \ prerr_endline : string -> void
##register print_string \ js_print : string -> void
-##register print_float \ js_print : float -> void
##register print_int \ js_print : int -> void
##register dump\ dump_value : 'a -> string
@@ -406,15 +394,16 @@ var dump_value = function (x) {
if (t in dumper) return dumper[t](x);
else return t;
}
-##register debug_print \ dump_value: 'a -> string
##opa-type Order.comparison
##opa-type Order.ordering
+//Used in bslString.js
##register order_lt \ result_lt : Order.ordering
##register order_eq \ result_eq : Order.ordering
##register order_gt \ result_gt : Order.ordering
+// Used in bslNumber.js
##register compare_lt \ result_lt : Order.comparison
##register compare_eq \ result_eq : Order.comparison
##register compare_gt \ result_gt : Order.comparison
View
29 opabsl/mlbsl/bslPervasives.ml
@@ -79,14 +79,6 @@ let int_of_first_char c = Pervasives.int_of_char (String.get c 0)
##register areSameObject : 'a, 'b -> bool
let areSameObject x y = Obj.magic x == Obj.magic y
-(**
- * Determine if the code is executed server-side
- *
- * @return true in this implementation
-*)
-##register webutils_server_side : -> bool
-let webutils_server_side () = true
-
(**
@@ -199,15 +191,6 @@ let prerr_endline s = sync_to_print_on stdout ; Pervasives.prerr_endline s
##register print_int : int -> void
let print_int i = print_string (string_of_int i)
-##register print_float : float -> void
-let print_float i = print_string (string_of_float i)
-
-##register println_int : int -> void
-let println_int i = println_string (string_of_int i)
-
-##register println_float : float -> void
-let println_float i = println_string (string_of_float i)
-
##register flush_stdout : -> void
let flush_stdout () = Pervasives.flush stdout
@@ -228,22 +211,10 @@ let flush_all () = Pervasives.flush_all ()
let dump x =
DebugPrint.print x
-##register debug_print: 'a -> string
-let debug_print = dump
-
-
##opa-type Order.comparison
##opa-type Order.ordering
-##register order_lt\ ord_result_lt: Order.ordering
-##register order_eq\ ord_result_eq: Order.ordering
-##register order_gt\ ord_result_gt: Order.ordering
-##register compare_lt\ comp_result_lt: Order.comparison
-##register compare_eq\ comp_result_eq: Order.comparison
-##register compare_gt\ comp_result_gt: Order.comparison
-##register compare_neq\ comp_result_neq: Order.comparison
-
let ord_result_lt = wrap_opa_order_ordering (ServerLib.make_simple_record (ServerLib.static_field_of_name "lt"))
let ord_result_eq = wrap_opa_order_ordering (ServerLib.make_simple_record (ServerLib.static_field_of_name "eq"))
let ord_result_gt = wrap_opa_order_ordering (ServerLib.make_simple_record (ServerLib.static_field_of_name "gt"))

0 comments on commit 64d71ea

Please sign in to comment.