@@ -48,13 +48,13 @@ literals = mkPattern' match'
4848 match (BooleanLiteral _ True) = return $ emit "true"
4949 match (BooleanLiteral _ False) = return $ emit "false"
5050 match (ArrayLiteral _ xs) = mconcat <$> sequence
51− [ return $ emit "array_t{"
51+ [ return . emit $ arrayType <> "{"
5252 , intercalate (emit ", ") <$> forM xs prettyPrintCpp'
5353 , return $ emit "}"
5454 ]
5555 -- match (ObjectLiteral _ []) = return $ emit "std::initializer_list<std::pair<const string, boxed>>{}"
5656 match (ObjectLiteral _ ps) = mconcat <$> sequence
57− [ return $ emit "dict_t{\n"
57+ [ return . emit $ dictType <> "{\n"
5858 , withIndent $ do
5959 cpps <- forM ps $ \(key, value) -> do
6060 value' <- prettyPrintCpp' value
@@ -384,9 +384,9 @@ prettyPrintCpp1 = maybe (internalError "Incomplete pattern") runPlainString . fl
384384
385385stringLiteral :: PSString -> Text
386386stringLiteral pss | Just s <- decodeString pss =
387− if T.all isAscii s
388− then ""
389− else ("u8") <> stringLiteral' s
387+ (if T.all isAscii s
388+ then ""
389+ else ("u8")) <> stringLiteral' s
390390 where
391391 stringLiteral' :: Text -> Text
392392 stringLiteral' s = "\"" <> T.concatMap encodeChar s <> "\""
@@ -481,6 +481,9 @@ implFooterSource mn foreigns =
481481dictType :: Text
482482dictType = "dict_t"
483483
484+arrayType :: Text
485+arrayType = "array_t"
486+
484487int :: Text
485488int = "int"
486489