diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2017-11-22 15:31:29 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2017-11-22 15:31:29 +0100 |
commit | df4778f2f061c71cf1d9e51fe8ec657d04bbdfeb (patch) | |
tree | 030945a292456cb19a00b837d0328c0f30b8fad8 | |
parent | 18f6319703d7bec460754fdceee5f0f2cfbc2702 (diff) |
Corrections for OCaml 4.06.0
-rwxr-xr-x | actionParser.mly | 2 | ||||
-rw-r--r-- | date.ml | 10 | ||||
-rwxr-xr-x | readme.rst | 2 | ||||
-rwxr-xr-x | 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 <int*int>BUTTON1_RELEASED %token COMMAND -%token <Num.num> Num - %start <Actions.actions> normal %% @@ -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 ( @@ -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 @@ -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 |