@@ -31,6 +31,7 @@
31#include <vector>
31#include <vector>
32#include <unordered_map>
32#include <unordered_map>
33#include <stdexcept>
33#include <stdexcept>
35namespace PureScript {
36namespace PureScript {
@@ -40,9 +41,6 @@ using nullptr_t = std::nullptr_t;
41const bool undefined = false;
42const bool undefined = false;
43−// TODO: deprecated -- remove
46// A variant data class designed to provide some features of dynamic typing.
44// A variant data class designed to provide some features of dynamic typing.
48class any {
46class any {
@@ -69,7 +67,7 @@ class any {
70 static constexpr as_thunk unthunk = as_thunk{};
68 static constexpr as_thunk unthunk = as_thunk{};
72− using map = std::unordered_map<std::string, const any>;
70+ using map = std::unordered_map<map_key_t, const any, map_key_t::hasher, map_key_t::equal>;
73 using vector = std::vector<any>;
71 using vector = std::vector<any>;
74 using fn = std::function<any(const any&)>;
72 using fn = std::function<any(const any&)>;
75 using eff_fn = std::function<any()>;
73 using eff_fn = std::function<any()>;
@@ -246,7 +244,7 @@ class any {
246 operator const map&() const;
244 operator const map&() const;
247 operator const vector&() const;
245 operator const vector&() const;
249− auto operator[](const char []) const -> const any&;
247+ auto operator[](const map_key_t&) const -> const any&;
250 auto operator[](const vector::size_type) const -> const any&;
248 auto operator[](const vector::size_type) const -> const any&;
251 auto operator[](const any&) const -> const any&;
249 auto operator[](const any&) const -> const any&;