lookupByEmail :: Email -> SqlPersistM (Maybe (Account, AccountUidpwd))
lookupByEmail email =
  onlyOne . fmap unwrap <$>
  (select . from $ \(account `InnerJoin` accountUidpwd) -> do
     on $
       account ^. AccountAccountId ==. accountUidpwd ^. AccountUidpwdAccountId
     where_ (accountUidpwd ^. AccountUidpwdEmail ==. val email)
     return (account, accountUidpwd))
lookupByEmail :: Email -> SqlPersistM (Maybe (Account, AccountUidpwd))
lookupByEmail email =
  onlyOne . fmap unwrap <$>
  (select . from $ \(account `InnerJoin` accountUidpwd) -> do
     on $
       account ^. AccountAccountId ==. accountUidpwd ^. AccountUidpwdAccountId
     where_ (accountUidpwd ^. AccountUidpwdEmail ==. val email)
     return (account, accountUidpwd))
lookupByEmail email =
  onlyOne . fmap unwrap <$>
  (select . from $ \(account `InnerJoin` accountUidpwd) -> do
     on $
       account ^. AccountAccountId ==. accountUidpwd ^. AccountUidpwdAccountId
     where_ (accountUidpwd ^. AccountUidpwdEmail ==. val email)
     return (account, accountUidpwd))