From 35f0464948a2470921e9289ab0ccc774c9b3a248 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Sun, 12 Jan 2020 14:32:44 -0800 Subject: [PATCH 1/2] bump motoko --- e2e/assets/counter_idl_mo/counter_idl.mo | 9 ++++++--- e2e/assets/print_mo/print.mo | 4 +++- nix/sources.json | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/e2e/assets/counter_idl_mo/counter_idl.mo b/e2e/assets/counter_idl_mo/counter_idl.mo index b44f4f4398..31824943c9 100644 --- a/e2e/assets/counter_idl_mo/counter_idl.mo +++ b/e2e/assets/counter_idl_mo/counter_idl.mo @@ -1,3 +1,6 @@ +import A "mo:stdlib/array.mo"; +import Prim "mo:prim"; + type List = ?{head : T; tail : List}; type List2 = { #nil; #cons: (T, List2) }; @@ -15,7 +18,7 @@ actor { } }; public func inc(i: Int, b: Bool, str: Text, vec: [Nat], l: List, l2: List2) : async (Int, Bool, Text, [Nat], List, List2) { - let arr = Array_tabulate( + let arr = A.tabulate( vec.len(), func (i : Nat) : Nat { vec[i]+1; @@ -23,8 +26,8 @@ actor { var text = ""; for (c in str.chars()) { - let c2 = word32ToChar(charToWord32(c)+1); - text := text # charToText(c2); + let c2 = Prim.word32ToChar(charToWord32(c)+1); + text := text # Prim.charToText(c2); }; return (i+1, not b, text, arr, map(l), map2(l2)); }; diff --git a/e2e/assets/print_mo/print.mo b/e2e/assets/print_mo/print.mo index 604c56f1f9..49b5b7d701 100644 --- a/e2e/assets/print_mo/print.mo +++ b/e2e/assets/print_mo/print.mo @@ -1,5 +1,7 @@ +import Debug "mo:stdlib/debug.mo"; + actor HelloActor { public func hello() : async () { - debugPrint("Hello, World! from DFINITY \n"); + Debug.print("Hello, World! from DFINITY \n"); } }; diff --git a/nix/sources.json b/nix/sources.json index 2d85612080..b96f54a85a 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -26,7 +26,7 @@ "motoko": { "ref": "master", "repo": "ssh://git@github.com/dfinity-lab/motoko", - "rev": "53723e64705f165025e89586607810a5787b05e7", + "rev": "4d6afaa511cd9ae62ad2bb6a3c9a0f79c818ab8d", "type": "git" }, "napalm": { From 6f523ded421e0e671a152f96edbfc3dd43842b83 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Sun, 12 Jan 2020 14:39:24 -0800 Subject: [PATCH 2/2] fix --- e2e/assets/counter_idl_mo/counter_idl.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/assets/counter_idl_mo/counter_idl.mo b/e2e/assets/counter_idl_mo/counter_idl.mo index 31824943c9..423b284842 100644 --- a/e2e/assets/counter_idl_mo/counter_idl.mo +++ b/e2e/assets/counter_idl_mo/counter_idl.mo @@ -26,7 +26,7 @@ actor { var text = ""; for (c in str.chars()) { - let c2 = Prim.word32ToChar(charToWord32(c)+1); + let c2 = Prim.word32ToChar(Prim.charToWord32(c)+1); text := text # Prim.charToText(c2); }; return (i+1, not b, text, arr, map(l), map2(l2));