@@ -137,7 +137,7 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
138 (CppBlock (fieldLambdas fs))
138 (CppBlock (fieldLambdas fs))
140− name = qualifiedToStr (ModuleName []) id (Qualified (Just mn) ident)
140+ name = identToCpp ident
141 fields' = identToCpp <$> fields
141 fields' = identToCpp <$> fields
142 (f, fs) | (f' : fs') <- fields' = ([f'], fs')
142 (f, fs) | (f' : fs') <- fields' = ([f'], fs')
143 | otherwise = ([], [])
143 | otherwise = ([], [])
@@ -399,14 +399,16 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
399 binderToCpp varName done (ConstructorBinder (_, _, _, Just IsNewtype) _ _ [b]) =
399 binderToCpp varName done (ConstructorBinder (_, _, _, Just IsNewtype) _ _ [b]) =
400 binderToCpp varName done b
400 binderToCpp varName done b
402− binderToCpp varName done (ConstructorBinder (_, _, _, Just (IsConstructor ctorType fields)) _ ctor bs) = do
402+ binderToCpp varName done (ConstructorBinder (_, _, _, Just (IsConstructor ctorType fields))
404+ (Qualified _ (ProperName ctor))
403 cpps <- go (zip fields bs) done
406 cpps <- go (zip fields bs) done
404− let ctor' = qualifiedToStr (ModuleName []) (Ident . runProperName) ctor
405 return $ case ctorType of
407 return $ case ctorType of
406 ProductType -> cpps
408 ProductType -> cpps
407 SumType ->
409 SumType ->
408 [ CppIfElse (CppBinary Equal (CppIndexer (CppVar ctorKey) (CppVar varName))
410 [ CppIfElse (CppBinary Equal (CppIndexer (CppVar ctorKey) (CppVar varName))
409− (CppStringLiteral ctor'))
411+ (CppStringLiteral ctor))
410 (CppBlock cpps)
412 (CppBlock cpps)
411 Nothing ]
413 Nothing ]