git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'pure11' of github.com:pure11/purescript into pure11-0.8
commit4f0968cdceab88f82b692573ddca721ba6229494 authorAndy Arvanitis <andyarvanitis@gmail.com> dateSun 31 Jan 2016, 16:18 (11 years ago) parentfc062f22bd16c2
1 file changed+6−4
src/Language/PureScript/CodeGen/Cpp.hs+6−4
src/Language/PureScript/CodeGen/Cpp.hs+6−4
@@ -137,7 +137,7 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
137137 []
138138 (CppBlock (fieldLambdas fs))
139139 where
140− name = qualifiedToStr (ModuleName []) id (Qualified (Just mn) ident)
140+ name = identToCpp ident
141141 fields' = identToCpp <$> fields
142142 (f, fs) | (f' : fs') <- fields' = ([f'], fs')
143143 | otherwise = ([], [])
@@ -399,14 +399,16 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
399399 binderToCpp varName done (ConstructorBinder (_, _, _, Just IsNewtype) _ _ [b]) =
400400 binderToCpp varName done b
401401
402− binderToCpp varName done (ConstructorBinder (_, _, _, Just (IsConstructor ctorType fields)) _ ctor bs) = do
402+ binderToCpp varName done (ConstructorBinder (_, _, _, Just (IsConstructor ctorType fields))
403+ _
404+ (Qualified _ (ProperName ctor))
405+ bs) = do
403406 cpps <- go (zip fields bs) done
404− let ctor' = qualifiedToStr (ModuleName []) (Ident . runProperName) ctor
405407 return $ case ctorType of
406408 ProductType -> cpps
407409 SumType ->
408410 [ CppIfElse (CppBinary Equal (CppIndexer (CppVar ctorKey) (CppVar varName))
409− (CppStringLiteral ctor'))
411+ (CppStringLiteral ctor))
410412 (CppBlock cpps)
411413 Nothing ]
412414 where