Skip to content

Instantly share code, notes, and snippets.

@kmels
Created October 17, 2012 21:53
Show Gist options
  • Save kmels/3908520 to your computer and use it in GitHub Desktop.
Save kmels/3908520 to your computer and use it in GitHub Desktop.
yesod
maybeGetBy :: forall (m :: * -> *) val. (PersistEntity val,
PersistUnique
(PersistEntityBackend val) m) =>
Unique val (PersistEntityBackend val)
-> MaybeT
(PersistEntityBackend val m) (Database.Persist.Store.Entity val)
maybeGetBy criterion = MaybeT $ getBy criterion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment