From df4778f2f061c71cf1d9e51fe8ec657d04bbdfeb Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 22 Nov 2017 15:31:29 +0100 Subject: Corrections for OCaml 4.06.0 --- actionParser.mly | 2 -- date.ml | 10 ++++------ readme.rst | 2 +- screen.ml | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/actionParser.mly b/actionParser.mly index 809a9ad..6318ca6 100755 --- a/actionParser.mly +++ b/actionParser.mly @@ -17,8 +17,6 @@ %token BUTTON1_RELEASED %token COMMAND -%token Num - %start normal %% diff --git a/date.ml b/date.ml index 0a2631f..92cb9f6 100644 --- a/date.ml +++ b/date.ml @@ -95,12 +95,10 @@ module Make(C : CALCULABLE) = struct and time_regex = Str.regexp "[0-9]+-[0-9]+-[0-9]+T[0-9]+:[0-9]+:[0-9]" in if Str.string_match time_regex str 0 then Scanf.sscanf str "%d-%d-%dT%d:%d:%d" (fun year month day hour min sec -> - Num.( - let nhour = C.div (n hour) (n 24) - and nmin = C.div (n min) (n 1440) - and nsec = C.div (n sec) (n 86400) in - C.add (C.add (C.add (get_julian_day year month day) nhour) nmin) nsec - ) + let nhour = C.div (n hour) (n 24) + and nmin = C.div (n min) (n 1440) + and nsec = C.div (n sec) (n 86400) in + C.add (C.add (C.add (get_julian_day year month day) nhour) nmin) nsec ) else if Str.string_match date_regex str 0 then Scanf.sscanf str "%d-%d-%d" get_julian_day else ( diff --git a/readme.rst b/readme.rst index b3ee815..f37c17f 100755 --- a/readme.rst +++ b/readme.rst @@ -176,7 +176,7 @@ Condition ========================= =========================================== Function Value ========================= =========================================== -`if(Bool`; *x* ; *y* `)` Return *x* if `Bool` is Thue, otherwise *y* +`if(Bool`; *x* ; *y* `)` Return *x* if `Bool` is True, otherwise *y* ========================= =========================================== Numeric diff --git a/screen.ml b/screen.ml index a8e2d0c..8279c62 100755 --- a/screen.ml +++ b/screen.ml @@ -54,7 +54,7 @@ let status screen msg = begin let height, width = screen.size in UTF8.encode msg |> Option.iter (fun encoded -> let status = Bytes.make (width -1) ' ' in - Bytes.blit encoded 0 status 0 (String.length encoded); + String.blit encoded 0 status 0 (String.length encoded); Curses.werase screen.status; if not ( Curses.mvwaddstr screen.status 0 0 encoded -- cgit v1.2.3