git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: use nullptr for rendering empty records (unit)
commit17867a21bee700039a6d993c947a751dd85d24c6 authorAndy Arvanitis <andyarvanitis@gmail.com> dateWed 21 Dec 2016, 20:46 (10 years ago) parent35ee24b
1 file changed+1
src/Language/PureScript/Pretty/Cpp.hs+1
src/Language/PureScript/Pretty/Cpp.hs+1
@@ -106,6 +106,7 @@ literals = mkPattern' match
106106 , return $ T.intercalate ", " es
107107 , return " }"
108108 ]
109+ match (CppMapLiteral Record []) = return "nullptr"
109110 match (CppMapLiteral _ ps) = mconcat <$> sequence
110111 [ return $ runType (mapType $ length ps + 1) <> "{{\n"
111112 , withIndent $ do