Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions e2e/assets/counter_idl/counter_idl.mo
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import A "mo:base/Array";
import Prim "mo:prim";
import C "mo:base/Char";
import T "mo:base/Text";

actor {
public type List<T> = ?{head : T; tail : List<T>};
public type List2<T> = { #nil; #cons: (T, List2<T>) };
func map(l: List<Int>) : List<Int> = {

func map(l: List<Int>) : List<Int> {
switch l {
case null { null };
case (?v) { ?{head=v.head+1; tail=map(v.tail)} };
}
};
func map2(l: List2<Int>) : List2<Int> = {
func map2(l: List2<Int>) : List2<Int> {
switch l {
case (#nil) { #nil };
case (#cons(h, tl)) { #cons(h+1, map2 tl) };
Expand All @@ -26,8 +27,8 @@ actor {

var text = "";
for (c in str.chars()) {
let c2 = Prim.word32ToChar(Prim.charToWord32(c)+1);
text := text # Prim.charToText(c2);
let c2 = C.fromNat32(C.toNat32(c)+1);
text := text # T.fromChar(c2);
};
return (i+1, not b, text, arr, map(l), map2(l2));
};
Expand Down
2 changes: 1 addition & 1 deletion e2e/assets/identity/identity.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import P "mo:base/Principal";

shared {caller} actor class () = Self {
shared({caller}) actor class () = Self {
private let initializer : Principal = caller;

public shared(msg) func fromCall(): async Principal {
Expand Down
2 changes: 1 addition & 1 deletion nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"motoko": {
"branch": "release",
"repo": "ssh://git@github.com/dfinity/motoko",
"rev": "85651c6b2d118cc068c4263f6fe548a85e805861",
"rev": "7a2a0e456ae0f18865cd8ab6b4a3d77863ce578f",
"tag": "0.5.10",
"type": "git"
},
Expand Down