From 0477b68dc3af1c952a1ade56e07faaabb6585af0 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Sat, 30 Nov 2019 10:49:37 -0500 Subject: [PATCH] Add SendMap and SendSet --- Cargo.lock | 15 +++++++++++++++ Cargo.toml | 3 ++- src/collections.rs | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 755455da8c..e1e5b56edb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/Cargo.toml b/Cargo.toml index 55021a08b2..8fcbf47fb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/collections.rs b/src/collections.rs index 3ad344c6e4..39ce1cb339 100644 --- a/src/collections.rs +++ b/src/collections.rs @@ -24,6 +24,10 @@ pub type ImMap = im_rc::hashmap::HashMap; pub type ImSet = im_rc::hashset::HashSet; +pub type SendMap = im::hashmap::HashMap; + +pub type SendSet = im::hashset::HashSet; + pub fn arena_join<'a, I>(arena: &'a Bump, strings: &mut I, join_str: &str) -> String<'a> where I: Iterator,