Skip to content

Instantly share code, notes, and snippets.

@mwotton
Created September 24, 2011 04:30
Show Gist options
  • Save mwotton/1238970 to your computer and use it in GitHub Desktop.
Save mwotton/1238970 to your computer and use it in GitHub Desktop.
yesod util function
orFail action = do res <- action
case res of
Just j -> return j
Nothing -> invalidArgs ["something went wrong"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment