Skip to content

Instantly share code, notes, and snippets.

@simonmichael
Created April 16, 2009 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonmichael/96120 to your computer and use it in GitHub Desktop.
Save simonmichael/96120 to your computer and use it in GitHub Desktop.
sha1 <- case (pgSelectedTab layout, rev) of
(EditTab,Nothing) -> liftIO $ catch (latest fs $ pathForPage page)
(\e -> if e == NotFound
then return ""
else throwIO e)
(EditTab,Just r) -> return r
otherwise -> return ""
let maybeSetSha1 | null sha1 = id
| otherwise = T.setAttribute "sha1" sha1
let filledTemp = T.render $
maybeSetSha1 $
etc..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment