@@ -41,6 +41,14 @@ namespace purescript {
41 boxed(const int n) : std::shared_ptr<void>(std::make_shared<int>(n)) {
41 boxed(const int n) : std::shared_ptr<void>(std::make_shared<int>(n)) {
44+ boxed(const long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
46+ if (n < std::numeric_limits<int>::min() || n > std::numeric_limits<int>::max()) {
47+ throw std::runtime_error("integer out of range");
44 boxed(const double n) : std::shared_ptr<void>(std::make_shared<double>(n)) {
52 boxed(const double n) : std::shared_ptr<void>(std::make_shared<double>(n)) {