aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2017-11-22 15:31:29 +0100
committerSébastien Dailly <sebastien@chimrod.com>2017-11-22 15:31:29 +0100
commitdf4778f2f061c71cf1d9e51fe8ec657d04bbdfeb (patch)
tree030945a292456cb19a00b837d0328c0f30b8fad8
parent18f6319703d7bec460754fdceee5f0f2cfbc2702 (diff)
Corrections for OCaml 4.06.0
-rwxr-xr-xactionParser.mly2
-rw-r--r--date.ml10
-rwxr-xr-xreadme.rst2
-rwxr-xr-xscreen.ml2
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
%%
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