git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: remove another unnecessary lambda capture
48ce93bAndy Arvanitis
src/Language/PureScript/CodeGen/Cpp/File.hs+1
@@ -123,6 +123,7 @@ toBody = catMaybes . map go
123 objlam :: (String, Cpp) -> (String, Cpp)
123 objlam :: (String, Cpp) -> (String, Cpp)
124 objlam (name, (CppLambda _ args rty body)) = (name , CppLambda [] args rty $ addCaptures body)
124 objlam (name, (CppLambda _ args rty body)) = (name , CppLambda [] args rty $ addCaptures body)
125 objlam obj = obj
125 objlam obj = obj
126+ addCaptures (CppApp (CppLambda _ [] rty body) []) = CppApp (CppLambda [] [] rty (addCaptures body)) []
126 addCaptures cpps' = everywhereOnCpp addCapture cpps'
127 addCaptures cpps' = everywhereOnCpp addCapture cpps'
127 where
128 where
128 addCapture :: Cpp -> Cpp
129 addCapture :: Cpp -> Cpp