git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use std::vector instead of std::deque for Arrays
commitb08e50398d6ef7f487a0f8b258dc0cc49917ec86 authorAndy Arvanitis <andyarvanitis@gmail.com> dateFri 1 Feb 2019, 21:40 (8 years ago) parent775592d
2 files changed+3−3
README.md+1−1 runtime/purescript.h+2−2
README.md+1−1
@@ -30,7 +30,7 @@ This is an experimental C++11 (or later) compiler backend for [PureScript](https
3030
3131#### Other notes:
3232
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)
3434* `String` types are implemented with C++11 `u8` literals (UTF-8) and `std::string`
3535* `Number` is C++ `double`, `Int` is C++ `int`, `Char` is `std::string` (single UTF-8 entity), `Boolean` is `bool`
3636
runtime/purescript.h+2−2
@@ -17,7 +17,7 @@
1717
1818#include <memory>
1919#include <functional>
20−#include <deque>
20+#include <vector>
2121#include <string>
2222#include <limits>
2323#include "string_literal_dict.h"
@@ -39,7 +39,7 @@ namespace purescript {
3939 using fn_t = std::function<boxed(const boxed&)>;
4040 using eff_fn_t = std::function<boxed(void)>;
4141 using dict_t = string_literal_dict_t<boxed>;
42− using array_t = std::deque<boxed>;
42+ using array_t = std::vector<boxed>;
4343
4444 public:
4545 boxed() noexcept : shared() {}