Skip to content

Instantly share code, notes, and snippets.

@brinchj
Created March 7, 2013 10:41
Show Gist options
  • Save brinchj/5107157 to your computer and use it in GitHub Desktop.
Save brinchj/5107157 to your computer and use it in GitHub Desktop.
(lblX, SIf cond lblY) <- ifP
 body1 <- untilLabel lblY
 case lastMay body1 of
   -- if with else (body1 ends in GOTO)
   Just (_, SGoto lblZ) -> do
     body2 <- untilLabel lblZ
     return [(lblX, SIfElse cond body2 (init body1))]
   -- if with no else
   _ -> return [lblX, SIfElse cond [] body1)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment