git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: rename generated thunk value var name
5a95558Andy Arvanitis
src/Language/PureScript/CodeGen/Cpp/File.hs+2−2
@@ -113,8 +113,8 @@ toBody = catMaybes . map go
113 go (CppVariableIntroduction (name, _) _ (Just cpp)) =
113 go (CppVariableIntroduction (name, _) _ (Just cpp)) =
114 Just $ CppVariableIntroduction (name, Just $ CppAny [CppConst]) [] (Just lambda)
114 Just $ CppVariableIntroduction (name, Just $ CppAny [CppConst]) [] (Just lambda)
115 where
115 where
116− val = CppVariableIntroduction ("_value_", Just $ CppAny [CppConst]) [CppStatic] (Just $ addCaptures cpp)
116+ val = CppVariableIntroduction ("$value$", Just $ CppAny [CppConst]) [CppStatic] (Just $ addCaptures cpp)
117− block = CppBlock [val, CppReturn (CppVar "_value_")]
117+ block = CppBlock [val, CppReturn (CppVar "$value$")]
118 lambda = CppLambda [] [("", Just $ thunkMarkerType)] (Just $ CppAny [CppConst, CppRef]) block
118 lambda = CppLambda [] [("", Just $ thunkMarkerType)] (Just $ CppAny [CppConst, CppRef]) block
119 addCaptures :: Cpp -> Cpp
119 addCaptures :: Cpp -> Cpp
120 addCaptures (CppObjectLiteral objs) = CppObjectLiteral (objlam <$> objs)
120 addCaptures (CppObjectLiteral objs) = CppObjectLiteral (objlam <$> objs)