git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: use nullptr for rendering empty records (unit)
17867a2Andy Arvanitis
src/Language/PureScript/Pretty/Cpp.hs+1
@@ -106,6 +106,7 @@ literals = mkPattern' match
106 , return $ T.intercalate ", " es
106 , return $ T.intercalate ", " es
107 , return " }"
107 , return " }"
108 ]
108 ]
109+ match (CppMapLiteral Record []) = return "nullptr"
109 match (CppMapLiteral _ ps) = mconcat <$> sequence
110 match (CppMapLiteral _ ps) = mconcat <$> sequence
110 [ return $ runType (mapType $ length ps + 1) <> "{{\n"
111 [ return $ runType (mapType $ length ps + 1) <> "{{\n"
111 , withIndent $ do
112 , withIndent $ do