Commits

Oliver Gu committed f420ea2

Removed core_extended dependency

  • Participants
  • Parent commits 714a44b

Comments (0)

Files changed (5)

 (* OASIS_START *)
-(* DO NOT EDIT (digest: 01ff1cfbba8b22dad797dd684d172fba) *)
+(* DO NOT EDIT (digest: b65ce503b4d5f032492169dcc06f977f) *)
 This is the INSTALL file for the ibx distribution.
 
 This package uses OASIS to generate its build system. See section OASIS for
 * fieldslib for library ibx
 * textutils for executable demultiplex, executable quote-table,
   executable test_runner
-* core_extended for executable interactive-quotes
 
 Installing
 ==========
   BuildDepends:   ibx, textutils
   CompiledObject: best
 
-Executable "interactive-quotes"
-  Build$:         flag(examples)
-  Path:           examples
-  MainIs:         interactive_quotes.ml
-  Install:        false
-  BuildDepends:   ibx, core_extended
-  CompiledObject: best
-
 Executable "last-price"
   Build$:         flag(examples)
   Path:           examples
 # OASIS_START
-# DO NOT EDIT (digest: c623b155ca14fe1bc8d2e0d3abc384d0)
+# DO NOT EDIT (digest: a3ffef327577c68bd398a02936ee3fb8)
 # Ignore VCS directories, you can use the same kind of rule outside 
 # OASIS_START/STOP if you want to exclude directories that contains 
 # useless stuff for the build process
 <examples/demultiplex.{native,byte}>: pkg_fieldslib.syntax
 <examples/demultiplex.{native,byte}>: pkg_threads
 <examples/demultiplex.{native,byte}>: pkg_str
-# Executable interactive-quotes
-<examples/interactive_quotes.{native,byte}>: use_ibx
-<examples/interactive_quotes.{native,byte}>: pkg_core_extended
-<examples/interactive_quotes.{native,byte}>: pkg_core
-<examples/interactive_quotes.{native,byte}>: pkg_async
-<examples/interactive_quotes.{native,byte}>: pkg_sexplib.syntax
-<examples/interactive_quotes.{native,byte}>: pkg_fieldslib.syntax
-<examples/interactive_quotes.{native,byte}>: pkg_threads
-<examples/interactive_quotes.{native,byte}>: pkg_str
-<examples/*.ml{,i}>: pkg_core_extended
 # Executable last-price
 <examples/last_price.{native,byte}>: use_ibx
 <examples/last_price.{native,byte}>: pkg_core

examples/interactive_quotes.ml

-open Core.Std
-open Async.Std
-open Ibx.Std
-
-let clear () =
-  In_thread.run (fun () ->
-    try Ok (Core_extended.Shell.run_full "clear" [])
-    with exn -> Error exn)
-
-let display_quotes ~duration ~currency ~symbol =
-  Common.with_tws_client (fun tws ->
-    let symbol = Symbol.of_string symbol in
-    Tws.quotes_exn tws ~contract:(Contract.stock ~currency symbol)
-    >>= fun (quotes, id) ->
-    upon (Clock.after duration) (fun () -> Tws.cancel_quotes tws id);
-    clear () >>= fun clear_string ->
-    let clear_string =
-      match clear_string with
-      | Ok s -> s
-      | Error _ -> ""
-    in
-    Pipe.iter_without_pushback quotes ~f:(fun quote ->
-      let bid = Quote.bid_price quote in
-      let ask = Quote.ask_price quote in
-      printf "%s%4.2f-%4.2f\n%!" clear_string
-        (Price.to_float bid) (Price.to_float ask)))
-
-let command =
-  Command.async_basic ~summary:"displays quotes interactively"
-    Command.Spec.(
-      empty
-      +> Common.logging_flag ()
-      +> Common.host_arg ()
-      +> Common.port_arg ()
-      +> Common.duration_arg ()
-      +> Common.currency_arg ()
-      +> anon ("STOCK-SYMBOL" %: string)
-    )
-    (fun enable_logging host port duration currency symbol () ->
-      display_quotes ~enable_logging ~host ~port ~duration ~currency ~symbol
-      >>= function
-      | Error e -> prerr_endline (Error.to_string_hum e); exit 1
-      | Ok () -> return ()
-    )
-
-let () = Exn.handle_uncaught ~exit:true (fun () -> Command.run command)
 (* setup.ml generated for the first time by OASIS v0.2.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: fa1bce65ebb5d701a5a0a19889200b18) *)
+(* DO NOT EDIT (digest: 5909ac3708c397b504ba222a6407ba38) *)
 (*
    Regenerated by OASIS v0.3.0
    Visit http://oasis.forge.ocamlcore.org for more information and
                    {exec_custom = false; exec_main_is = "demultiplex.ml"; });
                Executable
                  ({
-                     cs_name = "interactive-quotes";
-                     cs_data = PropList.Data.create ();
-                     cs_plugin_data = [];
-                     },
-                   {
-                      bs_build =
-                        [
-                           (OASISExpr.EBool true, false);
-                           (OASISExpr.EFlag "examples", true)
-                        ];
-                      bs_install = [(OASISExpr.EBool true, false)];
-                      bs_path = "examples";
-                      bs_compiled_object = Best;
-                      bs_build_depends =
-                        [
-                           InternalLibrary "ibx";
-                           FindlibPackage ("core_extended", None)
-                        ];
-                      bs_build_tools =
-                        [ExternalTool "ocamlbuild"; ExternalTool "ocamldoc"];
-                      bs_c_sources = [];
-                      bs_data_files = [];
-                      bs_ccopt = [(OASISExpr.EBool true, [])];
-                      bs_cclib = [(OASISExpr.EBool true, [])];
-                      bs_dlllib = [(OASISExpr.EBool true, [])];
-                      bs_dllpath = [(OASISExpr.EBool true, [])];
-                      bs_byteopt = [(OASISExpr.EBool true, [])];
-                      bs_nativeopt = [(OASISExpr.EBool true, [])];
-                      },
-                   {
-                      exec_custom = false;
-                      exec_main_is = "interactive_quotes.ml";
-                      });
-               Executable
-                 ({
                      cs_name = "last-price";
                      cs_data = PropList.Data.create ();
                      cs_plugin_data = [];
           };
      oasis_fn = Some "_oasis";
      oasis_version = "0.3.0";
-     oasis_digest =
-       Some "\204\184\001\029\004\220\224\215\244\133P\0233\131f\227";
+     oasis_digest = Some "[\249\162/\221N\137\129\230\012\001\001~od\252";
      oasis_exec = None;
      oasis_setup_args = [];
      setup_update = false;
 
 let setup () = BaseSetup.setup setup_t;;
 
-# 6365 "setup.ml"
+# 6329 "setup.ml"
 (* OASIS_STOP *)
 let () = setup ();;