Browse Source

LTS update, warning cleanup

osd
Michael Snoyman 7 years ago
parent
commit
4ec9caab59
  1. 2
      Data/Hackage/DeprecationInfo.hs
  2. 1
      Data/Slug.hs
  3. 1
      Data/Unpacking.hs
  4. 9
      Foundation.hs
  5. 2
      Handler/BuildPlan.hs
  6. 520
      cabal.config
  7. 1
      test/Data/SlugSpec.hs

2
Data/Hackage/DeprecationInfo.hs

@ -33,8 +33,6 @@ instance FromJSON DeprecationRecord where
package <- PackageName <$> (obj .: "deprecated-package")
inFavourOf <- map PackageName <$> (obj .: "in-favour-of")
return $ DeprecationRecord package inFavourOf
where
parsePackageName = fmap PackageName
toDeprecated :: DeprecationRecord -> Deprecated
toDeprecated (DeprecationRecord deprecated _) = Deprecated deprecated

1
Data/Slug.hs

@ -14,7 +14,6 @@ module Data.Slug
import ClassyPrelude.Yesod
import Database.Persist.Sql (PersistFieldSql (sqlType))
import qualified System.Random.MWC as MWC
import GHC.Prim (RealWorld)
import Text.Blaze (ToMarkup)
newtype Slug = Slug Text

1
Data/Unpacking.hs

@ -24,7 +24,6 @@ import qualified Data.Yaml as Y
import System.IO (IOMode (ReadMode), withBinaryFile, openBinaryFile)
import System.IO.Temp (withSystemTempFile, withTempFile, withSystemTempDirectory)
import System.Exit (ExitCode (ExitSuccess))
import System.Process (createProcess, proc, cwd, waitForProcess)
import qualified Filesystem.Path.CurrentOS as F
import Data.Conduit.Zlib (gzip, ungzip)
import qualified Data.ByteString.Base16 as B16

9
Foundation.hs

@ -14,16 +14,13 @@ import Settings.StaticFiles
import qualified System.Random.MWC as MWC
import Text.Blaze
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Types
import Yesod.Auth
import Yesod.Auth.BrowserId
import Yesod.Auth.GoogleEmail2
import Yesod.Auth.GoogleEmail2 (authGoogleEmail)
import Yesod.Core.Types (Logger, GWData)
import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal)
import Yesod.GitRepo
import Stackage.Types
-- | The site argument for your application. This can be a good place to
-- keep settings and values requiring initialization before your application
@ -215,7 +212,7 @@ instance YesodAuth App where
, userDisplay = credsIdent creds
, userToken = token
}
void $ insert Email
insert_ Email
{ emailEmail = credsIdent creds
, emailUser = userid
}
@ -224,7 +221,7 @@ instance YesodAuth App where
memail <- getBy $ UniqueEmail $ credsIdent creds
case memail of
Nothing -> do
void $ insert Email
insert_ Email
{ emailEmail = credsIdent creds
, emailUser = uid
}

2
Handler/BuildPlan.hs

@ -1,7 +1,7 @@
{-# LANGUAGE ConstraintKinds #-}
module Handler.BuildPlan where
import Import hiding (get, PackageName (..), Version (..))
import Import hiding (get, PackageName (..), Version (..), DList)
import Data.Slug (SnapSlug)
import qualified Filesystem as F
import Data.Yaml (decodeFileEither)

520
cabal.config

File diff suppressed because it is too large

1
test/Data/SlugSpec.hs

@ -7,7 +7,6 @@ import Test.Hspec.QuickCheck
import Data.Slug
import ClassyPrelude.Yesod
import qualified System.Random.MWC as MWC
import Control.Monad.Reader (runReaderT)
spec :: Spec
spec = describe "Data.Slug" $ do

Loading…
Cancel
Save