@@ -85,24 +85,18 @@ literals = mkPattern' match
85 match (CppCharLiteral c) = return $ "'" <> T.singleton c <> "'"
85 match (CppCharLiteral c) = return $ "'" <> T.singleton c <> "'"
86 match (CppBooleanLiteral True) = return "true"
86 match (CppBooleanLiteral True) = return "true"
87 match (CppBooleanLiteral False) = return "false"
87 match (CppBooleanLiteral False) = return "false"
88− match (CppArrayLiteral [x@CppArrayLiteral {}]) = -- Works around what appears to be a recent clang bug
90− [ return $ runType arrayType
88+ match (CppArrayLiteral []) = return $ runType arrayType <> "{}"
95 match (CppArrayLiteral xs) = mconcat <$> sequence
89 match (CppArrayLiteral xs) = mconcat <$> sequence
96 [ return $ runType arrayType
90 [ return $ runType arrayType
97− , return "{ "
91+ , return "{{ "
98 , fmap (T.intercalate ", ") $ forM xs prettyPrintCpp'
92 , fmap (T.intercalate ", ") $ forM xs prettyPrintCpp'
99− , return " }"
93+ , return " }}"
101 match (CppDataLiteral xs) = mconcat <$> sequence
95 match (CppDataLiteral xs) = mconcat <$> sequence
102 [ return $ runType (dataType $ length xs)
96 [ return $ runType (dataType $ length xs)
103− , return "{ "
97+ , return "{{ "
104 , fmap (T.intercalate ", ") $ forM xs prettyPrintCpp'
98 , fmap (T.intercalate ", ") $ forM xs prettyPrintCpp'
105− , return " }"
99+ , return " }}"
107 match (CppEnum name ty es) = mconcat <$> sequence
101 match (CppEnum name ty es) = mconcat <$> sequence
108 [ return "enum"
102 [ return "enum"