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