From e4dd6ddd2c491753590011dc5c58f9bb81d2ffd7 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 27 Jun 2010 17:42:05 +0300 Subject: [PATCH] persistent 0.1 --- Yesod/Formable.hs | 2 +- Yesod/Helpers/Crud.hs | 6 ++++-- Yesod/Yesod.hs | 4 ++-- yesod.cabal | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Yesod/Formable.hs b/Yesod/Formable.hs index cc7d56d1..33c1305a 100644 --- a/Yesod/Formable.hs +++ b/Yesod/Formable.hs @@ -26,7 +26,7 @@ import Text.Hamlet import Data.Time (Day) import Control.Applicative import Database.Persist (PersistField) -import Database.Persist.Helper (EntityDef (..)) +import Database.Persist.Base (EntityDef (..)) import Data.Char (isAlphaNum, toUpper, isUpper) import Language.Haskell.TH.Syntax import Control.Monad (liftM, join) diff --git a/Yesod/Helpers/Crud.hs b/Yesod/Helpers/Crud.hs index a7a17467..8ad82c5e 100644 --- a/Yesod/Helpers/Crud.hs +++ b/Yesod/Helpers/Crud.hs @@ -153,8 +153,10 @@ crudHelper title me isPost = do %a!href=@toMaster.CrudDeleteR.toSinglePiece.fst.e@ Delete |] -defaultCrud :: (PersistEntity i, YesodPersist a, PersistMonad i ~ YesodDB a) - => a -> Crud a i +defaultCrud + :: (PersistEntity i, PersistBackend (YesodDB a (GHandler (Crud a i) a)), + YesodPersist a) + => a -> Crud a i defaultCrud = const Crud { crudSelect = runDB $ select [] [] , crudReplace = \a -> runDB . replace a diff --git a/Yesod/Yesod.hs b/Yesod/Yesod.hs index 99cd0fda..d70ba3d1 100644 --- a/Yesod/Yesod.hs +++ b/Yesod/Yesod.hs @@ -8,7 +8,7 @@ module Yesod.Yesod , YesodSite (..) -- ** Persistence , YesodPersist (..) - , PersistEntity (..) + , module Database.Persist -- ** Breadcrumbs , YesodBreadcrumbs (..) , breadcrumbs @@ -30,7 +30,7 @@ import Web.ClientSession (getKey, defaultKeyFile) import qualified Web.ClientSession as CS import Data.Monoid (mempty) import Data.ByteString.UTF8 (toString) -import Database.Persist (PersistEntity (..)) +import Database.Persist import Web.Routes.Quasi (QuasiSite (..), Routes) diff --git a/yesod.cabal b/yesod.cabal index 8e99bf93..97847baf 100644 --- a/yesod.cabal +++ b/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 0.3.1.1 +version: 0.4.0 license: BSD3 license-file: LICENSE author: Michael Snoyman @@ -40,7 +40,7 @@ library control-monad-attempt >= 0.3 && < 0.4, cereal >= 0.2 && < 0.3, old-locale >= 1.0.0.2 && < 1.1, - persistent >= 0.0.0 && < 0.1 + persistent >= 0.1.0 && < 0.2 exposed-modules: Yesod Yesod.Content Yesod.Dispatch