diff options
author | aszlig <aszlig@nix.build> | 2018-03-01 06:08:51 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-03-01 06:08:51 +0100 |
commit | 1834ced22e4faf1e3afb3519febc176209099526 (patch) | |
tree | 55bbd061448c045f4e413cd2fd62e3049d0f2b69 | |
parent | 518771882f3216f99570a5e4711a4870bb064366 (diff) |
Support for Angstrom version 0.7 and later
In Angstrom 0.7 the interface changed a bit and parse_only is no longer there. Instead there is parse_string and parse_bigstring. I didn't actually add a version comparison to make it backwards-compatible. Tested with the example log file. Signed-off-by: aszlig <aszlig@nix.build>
-rw-r--r-- | default.nix | 3 | ||||
-rw-r--r-- | src/logbook.ml | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/default.nix b/default.nix index 559fe2b..d20f53a 100644 --- a/default.nix +++ b/default.nix @@ -1,2 +1 @@ -let pkgs = import <nixpkgs> {}; -in pkgs.ocamlPackages_4_02.callPackage ./logbook.nix {} +(import <nixpkgs> {}).ocamlPackages.callPackage ./logbook.nix {} diff --git a/src/logbook.ml b/src/logbook.ml index 870caa3..9f5fe44 100644 --- a/src/logbook.ml +++ b/src/logbook.ml @@ -4,7 +4,7 @@ open Lwt.Infix let parse_file f = Lwt_io.with_file Lwt_io.Input f (fun c -> Lwt_io.read c >>= (fun s -> - return (Angstrom.parse_only Log.log_parser (`String s)))) + return (Angstrom.parse_string Log.log_parser s))) let input_file = ref None let privacy = ref Log.Public |