@@ -214,15 +214,16 @@ literals = mkPattern' match
214214 , return " = "
215215 , prettyPrintCpp' value
216216 ]
217− match (CppWhile _ (CppBlock [])) = return []
218− match (CppWhile cond sts@(CppBlock sts')) = fmap concat $ sequence
217+ match (CppWhile cond sts) = fmap concat $ sequence
219218 [ return "while ("
220219 , prettyPrintCpp' cond
221220 , return ") "
222− , prettyPrintCpp' $ if last sts' == CppContinue
223− then CppBlock (init sts')
224− else sts
221+ , prettyPrintCpp' sts'
225222 ]
223+ where
224+ sts' | CppBlock cpps'@(_:_) <- sts,
225+ last cpps' == CppContinue = CppBlock (init cpps')
226+ | otherwise = sts
226227 match (CppIfElse cond thens elses) = fmap concat $ sequence
227228 [ return "if ("
228229 , prettyPrintCpp' cond