git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Clean up unneeded ctors in boxed class, def and use of 'undefined'
b18eb12Andy Arvanitis
pscpp.cabal+5−4
@@ -1,8 +1,10 @@
1+cabal-version: 1.12
2+
1−-- This file has been generated from package.yaml by hpack version 0.28.2.
3+-- This file has been generated from package.yaml by hpack version 0.31.0.
2--
4--
3-- see: https://github.com/sol/hpack
5-- see: https://github.com/sol/hpack
4--
6--
5−-- hash: 359fb647874c687db6015861dc97b20ba11f47258cc05324f1d925d939cb6024
7+-- hash: 21aa75281e615d7fe3001877e6820efd2dd2a33cf67fa7b101603e042139495e
6
8
7name: pscpp
9name: pscpp
8version: 0.1.0.0
10version: 0.1.0.0
@@ -15,10 +17,9 @@ copyright: 2018 Andy Arvanitis
15license: BSD3
17license: BSD3
16license-file: LICENSE
18license-file: LICENSE
17build-type: Simple
19build-type: Simple
18−cabal-version: >= 1.10
19extra-source-files:
20extra-source-files:
20− ChangeLog.md
21 README.md
21 README.md
22+ ChangeLog.md
22
23
23source-repository head
24source-repository head
24 type: git
25 type: git
runtime/purescript.h−3
@@ -38,10 +38,7 @@ namespace purescript {
38 public:
38 public:
39 using std::shared_ptr<void>::shared_ptr;
39 using std::shared_ptr<void>::shared_ptr;
40
40
41− boxed() noexcept : std::shared_ptr<void>() {}
42− boxed(const std::nullptr_t) noexcept : std::shared_ptr<void>() {}
43 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−
45 boxed(const long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
42 boxed(const long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
46#if !defined(NDEBUG) // if debug build
43#if !defined(NDEBUG) // if debug build
47 if (n < std::numeric_limits<int>::min() || n > std::numeric_limits<int>::max()) {
44 if (n < std::numeric_limits<int>::min() || n > std::numeric_limits<int>::max()) {
src/CodeGen/Cpp/Printer.hs+1−1
@@ -252,7 +252,7 @@ literals = mkPattern' match'
252 [ return $ emit "return "
252 [ return $ emit "return "
253 , prettyPrintCpp' value
253 , prettyPrintCpp' value
254 ]
254 ]
255− match (ReturnNoResult _) = return $ emit "return nullptr"
255+ match (ReturnNoResult _) = return $ emit "return undefined"
256 -- match (Throw _ _) = return mempty
256 -- match (Throw _ _) = return mempty
257 match (Throw _ value) = mconcat <$> sequence
257 match (Throw _ value) = mconcat <$> sequence
258 [ return $ emit "throw "
258 [ return $ emit "throw "