Add SendMap and SendSet

This commit is contained in:
Richard Feldman 2019-11-30 10:49:37 -05:00
parent 700fd6d2f2
commit 0477b68dc3
3 changed files with 21 additions and 1 deletions

15
Cargo.lock generated
View File

@ -474,6 +474,19 @@ dependencies = [
"unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "im"
version = "14.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitmaps 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_xoshiro 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sized-chunks 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "im-rc"
version = "14.0.0"
@ -1115,6 +1128,7 @@ name = "roc"
version = "0.1.0"
dependencies = [
"bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"im 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"im-rc 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"indoc 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"inkwell 0.1.0 (git+https://github.com/TheDan64/inkwell?branch=llvm8-0)",
@ -1695,6 +1709,7 @@ dependencies = [
"checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f"
"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
"checksum im 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a1f9b6540e530defef7f2df4ed330d45b739b10450548c74a9913f63ea1acc6b"
"checksum im-rc 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e9ad726dce25993be6352b0bff048e4d2647440c0a673d32257c4fac49356d18"
"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2"
"checksum indoc 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9553c1e16c114b8b77ebeb329e5f2876eed62a8d51178c8bc6bff0d65f98f8"

View File

@ -7,7 +7,8 @@ edition = "2018"
[dependencies]
log = "0.4.8"
petgraph = { version = "0.4.5", optional = true }
im-rc = "14.0.0"
im = "14.0.0" # im and im-rc should always have the same version!
im-rc = "14.0.0" # im and im-rc should always have the same version!
wyhash = "0.3.0"
tokio = { version = "0.2", features = ["fs", "rt-threaded"] }
bumpalo = "2.6.0"

View File

@ -24,6 +24,10 @@ pub type ImMap<K, V> = im_rc::hashmap::HashMap<K, V, BuildHasher>;
pub type ImSet<K> = im_rc::hashset::HashSet<K, BuildHasher>;
pub type SendMap<K, V> = im::hashmap::HashMap<K, V, BuildHasher>;
pub type SendSet<K> = im::hashset::HashSet<K, BuildHasher>;
pub fn arena_join<'a, I>(arena: &'a Bump, strings: &mut I, join_str: &str) -> String<'a>
where
I: Iterator<Item = &'a str>,