forked from dfinity/candid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support combining actors and returning imports
- Loading branch information
Showing
6 changed files
with
206 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import "import/a.did"; | ||
import "import/b/b.did"; | ||
type my_type = principal; | ||
type List = opt record { head: int; tail: List }; | ||
type f = func (List, func (int32) -> (int64)) -> (opt List); | ||
type broker = service { | ||
find : (name: text) -> | ||
(service {up:() -> (); current:() -> (nat32)}); | ||
}; | ||
type nested = record { nat; nat; record {nat;int;}; record { nat; 0x2a:nat; nat8; }; 42:nat; 40:nat; variant{ A; 0x2a; B; C }; }; | ||
|
||
service server : { | ||
f : (test: blob, opt bool) -> () oneway; | ||
g : (my_type, List, opt List, nested) -> (int, broker) query; | ||
h : (vec opt text, variant { A: nat; B: opt text }, opt List) -> (record { id: nat; 0x2a: record {} }); | ||
i : f; | ||
x : (a,b) -> (opt a, opt b); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
import "b/b.did"; | ||
type a = variant {a;b:b}; | ||
|
||
service server : { | ||
a : (test: blob, opt bool) -> () oneway; | ||
c : (b) -> (int) query; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
type List = opt record { head : int; tail : List }; | ||
type a = variant { a; b : b }; | ||
type b = record { int; nat }; | ||
type broker = service { | ||
find : (text) -> (service { current : () -> (nat32); up : () -> () }); | ||
}; | ||
type f = func (List, func (int32) -> (int64)) -> (opt List); | ||
type my_type = principal; | ||
type nested = record { | ||
0 : nat; | ||
1 : nat; | ||
2 : record { nat; int }; | ||
3 : record { 0 : nat; 42 : nat; 43 : nat8 }; | ||
40 : nat; | ||
41 : variant { 42; A; B; C }; | ||
42 : nat; | ||
}; | ||
service : { | ||
a : (vec nat8, opt bool) -> () oneway; | ||
c : (b) -> (int) query; | ||
f : (vec nat8, opt bool) -> () oneway; | ||
g : (my_type, List, opt List, nested) -> (int, broker) query; | ||
h : (vec opt text, variant { A : nat; B : opt text }, opt List) -> ( | ||
record { 42 : record {}; id : nat }, | ||
); | ||
i : f; | ||
x : (a, b) -> (opt a, opt b); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["a.did", "b.did"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters