diff --git a/Application.hs b/Application.hs index 3eedae5..96f42a7 100644 --- a/Application.hs +++ b/Application.hs @@ -310,14 +310,6 @@ cleanupTemp now fp , "newindex" ] -instance MonadActive m => MonadActive (SqlPersistT m) where -- FIXME orphan upstream - monadActive = lift monadActive -instance MonadReader env m => MonadReader env (SqlPersistT m) where - ask = lift ask - local f m = - do stT <- liftWith (\run -> local f (run m)) - restoreT (return stT) - -- for yesod devel getApplicationDev :: Bool -> IO (Int, Application) getApplicationDev useEcho = diff --git a/Data/Hackage.hs b/Data/Hackage.hs index e319a88..00af9d0 100644 --- a/Data/Hackage.hs +++ b/Data/Hackage.hs @@ -35,7 +35,6 @@ import Crypto.Hash (Digest, SHA256) import Data.Byteable (toBytes) import Distribution.Text (display) import Text.Markdown (Markdown (Markdown)) -import Data.Foldable (foldMap) import qualified Data.Traversable as T import qualified Data.Version import Text.ParserCombinators.ReadP (readP_to_S) diff --git a/Foundation.hs b/Foundation.hs index d6acd35..9a73f08 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -152,7 +152,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -221,6 +221,7 @@ instance YesodAuth App where authPlugins _ = [authBrowserId def, authGoogleEmail] authHttpManager = httpManager +instance YesodAuthPersist App getToken :: YesodDB App Slug getToken = diff --git a/Handler/Haddock.hs b/Handler/Haddock.hs index fd64318..9d764cc 100644 --- a/Handler/Haddock.hs +++ b/Handler/Haddock.hs @@ -4,9 +4,7 @@ import Import import Data.BlobStore import Filesystem (removeTree, isDirectory, createTree, isFile, rename, removeFile, removeDirectory) import Control.Concurrent (forkIO) -import Control.Concurrent.Chan import System.IO.Temp (withSystemTempFile, withTempFile) -import Control.Exception (mask, mask_) import System.Process (createProcess, proc, cwd, waitForProcess) import System.Exit (ExitCode (ExitSuccess)) import Network.Mime (defaultMimeLookup) diff --git a/Model.hs b/Model.hs index aa0f581..778f791 100644 --- a/Model.hs +++ b/Model.hs @@ -9,5 +9,5 @@ import Types -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") diff --git a/README.md b/README.md index ff30601..324914d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Server for stable, curated Haskell package sets Code builds with the Stackage snapshot: - remote-repo: stackage:http://www.stackage.org/stackage/aecbf72b568a63e86a971311fee5475f076043cc + remote-repo: stackage-e36ddac9333f2197ada6883b52f4834ddc0d5e37:http://www.stackage.org/stackage/e36ddac9333f2197ada6883b52f4834ddc0d5e37 Inside the config directory, there are two files ending in `-sample`. They should be copied to remove the `-sample` suffix for the site to work. We do it