-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finish implementating stable structures besides ord and partial ord t…
…raits, stable structures example tests passing
- Loading branch information
Showing
36 changed files
with
1,175 additions
and
1,194 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,65 @@ | ||
type BlogPost = record { title : text }; | ||
type Reaction = variant { Sad; Happy }; | ||
type User = record { username : text; posts : vec BlogPost }; | ||
service : () -> { | ||
stableMap0ContainsKey : (nat8) -> (bool) query; | ||
stableMap0Get : (nat8) -> (opt text) query; | ||
stableMap0Insert : (nat8, text) -> (opt text); | ||
stableMap0IsEmpty : () -> (bool) query; | ||
stableMap0Items : () -> (vec record { nat8; text }) query; | ||
stableMap0Keys : () -> (vec nat8) query; | ||
stableMap0Len : () -> (nat64) query; | ||
stableMap0Remove : (nat8) -> (opt text); | ||
stableMap0Values : () -> (vec text) query; | ||
stableMap1ContainsKey : (nat16) -> (bool) query; | ||
stableMap1Get : (nat16) -> (opt vec nat8) query; | ||
stableMap1Insert : (nat16, vec nat8) -> (opt vec nat8); | ||
stableMap1IsEmpty : () -> (bool) query; | ||
stableMap1Items : () -> (vec record { nat16; vec nat8 }) query; | ||
stableMap1Keys : () -> (vec nat16) query; | ||
stableMap1Len : () -> (nat64) query; | ||
stableMap1Remove : (nat16) -> (opt vec nat8); | ||
stableMap1Values : () -> (vec vec nat8) query; | ||
stableMap2ContainsKey : (nat32) -> (bool) query; | ||
stableMap2Get : (nat32) -> (opt nat) query; | ||
stableMap2Insert : (nat32, nat) -> (opt nat); | ||
stableMap2IsEmpty : () -> (bool) query; | ||
stableMap2Items : () -> (vec record { nat32; nat }) query; | ||
stableMap2Keys : () -> (vec nat32) query; | ||
stableMap2Len : () -> (nat64) query; | ||
stableMap2Remove : (nat32) -> (opt nat); | ||
stableMap2Values : () -> (vec nat) query; | ||
stableMap3ContainsKey : (Reaction) -> (bool) query; | ||
stableMap3Get : (Reaction) -> (opt int) query; | ||
stableMap3Insert : (Reaction, int) -> (opt int); | ||
stableMap3IsEmpty : () -> (bool) query; | ||
stableMap3Items : () -> (vec record { Reaction; int }) query; | ||
stableMap3Keys : () -> (vec Reaction) query; | ||
stableMap3Len : () -> (nat64) query; | ||
stableMap3Remove : (Reaction) -> (opt int); | ||
stableMap3Values : () -> (vec int) query; | ||
stableMap4ContainsKey : (User) -> (bool) query; | ||
stableMap4Get : (User) -> (opt float32) query; | ||
stableMap4Insert : (User, float32) -> (opt float32); | ||
stableMap4IsEmpty : () -> (bool) query; | ||
stableMap4Items : () -> (vec record { User; float32 }) query; | ||
stableMap4Keys : () -> (vec User) query; | ||
stableMap4Len : () -> (nat64) query; | ||
stableMap4Remove : (User) -> (opt float32); | ||
stableMap4Values : () -> (vec float32) query; | ||
} | ||
type rec_0 = variant {Sad; Happy}; | ||
type rec_1 = variant {Sad; Happy}; | ||
type rec_2 = variant {Sad; Happy}; | ||
type rec_3 = variant {Sad; Happy}; | ||
type rec_4 = variant {Sad; Happy}; | ||
type rec_5 = variant {Sad; Happy}; | ||
type rec_7 = record {title:text}; | ||
type rec_6 = record {username:text; posts:vec rec_7}; | ||
type rec_9 = record {title:text}; | ||
type rec_8 = record {username:text; posts:vec rec_9}; | ||
type rec_11 = record {title:text}; | ||
type rec_10 = record {username:text; posts:vec rec_11}; | ||
type rec_13 = record {title:text}; | ||
type rec_12 = record {username:text; posts:vec rec_13}; | ||
type rec_15 = record {title:text}; | ||
type rec_14 = record {username:text; posts:vec rec_15}; | ||
type rec_17 = record {title:text}; | ||
type rec_16 = record {username:text; posts:vec rec_17}; | ||
service: () -> { | ||
stableMap0ContainsKey: (nat8) -> (bool) query; | ||
stableMap0Get: (nat8) -> (opt text) query; | ||
stableMap0Insert: (nat8, text) -> (opt text); | ||
stableMap0IsEmpty: () -> (bool) query; | ||
stableMap0Items: () -> (vec record {nat8; text}) query; | ||
stableMap0Keys: () -> (vec nat8) query; | ||
stableMap0Len: () -> (nat64) query; | ||
stableMap0Remove: (nat8) -> (opt text); | ||
stableMap0Values: () -> (vec text) query; | ||
stableMap1ContainsKey: (nat16) -> (bool) query; | ||
stableMap1Get: (nat16) -> (opt vec nat8) query; | ||
stableMap1Insert: (nat16, vec nat8) -> (opt vec nat8); | ||
stableMap1IsEmpty: () -> (bool) query; | ||
stableMap1Items: () -> (vec record {nat16; vec nat8}) query; | ||
stableMap1Keys: () -> (vec nat16) query; | ||
stableMap1Len: () -> (nat64) query; | ||
stableMap1Remove: (nat16) -> (opt vec nat8); | ||
stableMap1Values: () -> (vec vec nat8) query; | ||
stableMap2ContainsKey: (nat32) -> (bool) query; | ||
stableMap2Get: (nat32) -> (opt nat) query; | ||
stableMap2Insert: (nat32, nat) -> (opt nat); | ||
stableMap2IsEmpty: () -> (bool) query; | ||
stableMap2Items: () -> (vec record {nat32; nat}) query; | ||
stableMap2Keys: () -> (vec nat32) query; | ||
stableMap2Len: () -> (nat64) query; | ||
stableMap2Remove: (nat32) -> (opt nat); | ||
stableMap2Values: () -> (vec nat) query; | ||
stableMap3ContainsKey: (rec_0) -> (bool) query; | ||
stableMap3Get: (rec_1) -> (opt int) query; | ||
stableMap3Insert: (rec_2, int) -> (opt int); | ||
stableMap3IsEmpty: () -> (bool) query; | ||
stableMap3Items: () -> (vec record {rec_3; int}) query; | ||
stableMap3Keys: () -> (vec rec_4) query; | ||
stableMap3Len: () -> (nat64) query; | ||
stableMap3Remove: (rec_5) -> (opt int); | ||
stableMap3Values: () -> (vec int) query; | ||
stableMap4ContainsKey: (rec_6) -> (bool) query; | ||
stableMap4Get: (rec_8) -> (opt float32) query; | ||
stableMap4Insert: (rec_10, float32) -> (opt float32); | ||
stableMap4IsEmpty: () -> (bool) query; | ||
stableMap4Items: () -> (vec record {rec_12; float32}) query; | ||
stableMap4Keys: () -> (vec rec_14) query; | ||
stableMap4Len: () -> (nat64) query; | ||
stableMap4Remove: (rec_16) -> (opt float32); | ||
stableMap4Values: () -> (vec float32) query; | ||
} |
Oops, something went wrong.