git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use std::vector instead of std::deque for Arrays
b08e503Andy Arvanitis
README.md+1−1
@@ -30,7 +30,7 @@ This is an experimental C++11 (or later) compiler backend for [PureScript](https
30
30
31#### Other notes:
31#### Other notes:
32
32
33−* PureScript arrays are implemented using ~~`std::deque`~~ [`std::vector`](http://en.cppreference.com/w/cpp/container/vector)
33+* PureScript arrays are implemented using [`std::vector`](http://en.cppreference.com/w/cpp/container/vector)
34* `String` types are implemented with C++11 `u8` literals (UTF-8) and `std::string`
34* `String` types are implemented with C++11 `u8` literals (UTF-8) and `std::string`
35* `Number` is C++ `double`, `Int` is C++ `int`, `Char` is `std::string` (single UTF-8 entity), `Boolean` is `bool`
35* `Number` is C++ `double`, `Int` is C++ `int`, `Char` is `std::string` (single UTF-8 entity), `Boolean` is `bool`
36
36
runtime/purescript.h+2−2
@@ -17,7 +17,7 @@
17
17
18#include <memory>
18#include <memory>
19#include <functional>
19#include <functional>
20−#include <deque>
20+#include <vector>
21#include <string>
21#include <string>
22#include <limits>
22#include <limits>
23#include "string_literal_dict.h"
23#include "string_literal_dict.h"
@@ -39,7 +39,7 @@ namespace purescript {
39 using fn_t = std::function<boxed(const boxed&)>;
39 using fn_t = std::function<boxed(const boxed&)>;
40 using eff_fn_t = std::function<boxed(void)>;
40 using eff_fn_t = std::function<boxed(void)>;
41 using dict_t = string_literal_dict_t<boxed>;
41 using dict_t = string_literal_dict_t<boxed>;
42− using array_t = std::deque<boxed>;
42+ using array_t = std::vector<boxed>;
43
43
44 public:
44 public:
45 boxed() noexcept : shared() {}
45 boxed() noexcept : shared() {}