C++: remove another unnecessary lambda capture
commit48ce93b4486b009d54a7c7acd123fc9fac271b1f
authorAndy Arvanitis <andyarvanitis@gmail.com>
dateSun 24 Jan 2016, 10:48 (11 years ago)
parent5340c48
src/Language/PureScript/CodeGen/Cpp/File.hs+1
@@ -123,6 +123,7 @@ toBody = catMaybes . map go
123123 objlam :: (String, Cpp) -> (String, Cpp)
124124 objlam (name, (CppLambda _ args rty body)) = (name , CppLambda [] args rty $ addCaptures body)
125125 objlam obj = obj
126+ addCaptures (CppApp (CppLambda _ [] rty body) []) = CppApp (CppLambda [] [] rty (addCaptures body)) []
126127 addCaptures cpps' = everywhereOnCpp addCapture cpps'
127128 where
128129 addCapture :: Cpp -> Cpp