Skip to content

Commit

Permalink
Switch from batteries to core.
Browse files Browse the repository at this point in the history
  • Loading branch information
yallop committed Jul 15, 2014
1 parent 79503ca commit bc69e6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ An example of using [ocaml-ctypes][ocaml-ctypes] to bind to [expat].

### Requirements:
* [ocamlfind][ocamlfind] (available on OPAM)
* [batteries][batteries] (available on OPAM)
* [core][core] (available on OPAM)
* [ocaml-ctypes][ocaml-ctypes] (available on OPAM)
* libexpat

### Building:
```bash
ocamlfind opt -package batteries,ctypes.foreign expat_example.ml \
ocamlfind opt -thread -package core,ctypes.foreign expat_example.ml \
-linkpkg -cclib -lexpat -o expat_example
```

### Running
```bash
./expat_example filename
./expat_example < document.xml
```

[ocaml-ctypes]: https://github.com/ocamllabs/ocaml-ctypes
[expat]: http://www.libexpat.org/
[batteries]: http://batteries.forge.ocamlcore.org/
[ocamlfind]: projects.camlcity.org/projects/findlib.html
[core]: https://github.com/janestreet/core
[ocamlfind]: projects.camlcity.org/projects/findlib.html
4 changes: 2 additions & 2 deletions expat_example.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
open Core.Std
open Ctypes
open Foreign

Expand Down Expand Up @@ -38,5 +39,4 @@ let end_handler _ _ =
decr depth

let () =
parse_string ~start_handler ~end_handler
Batteries.(Enum.fold (^) "" (File.lines_of Sys.argv.(1)))
parse_string ~start_handler ~end_handler (In_channel.input_all stdin)

0 comments on commit bc69e6e

Please sign in to comment.