diff --git a/yesod-auth-oauth/ChangeLog.md b/yesod-auth-oauth/ChangeLog.md index 9e1ca6ea..7bd91f76 100644 --- a/yesod-auth-oauth/ChangeLog.md +++ b/yesod-auth-oauth/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.6.0.1 + +* Compile with GHC 8.6 [#1561](https://github.com/yesodweb/yesod/pull/1561) + ## 1.6.0 * Upgrade to yesod-core 1.6.0 diff --git a/yesod-auth-oauth/Yesod/Auth/OAuth.hs b/yesod-auth-oauth/Yesod/Auth/OAuth.hs index 1a2d1852..8b2408d4 100644 --- a/yesod-auth-oauth/Yesod/Auth/OAuth.hs +++ b/yesod-auth-oauth/Yesod/Auth/OAuth.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DeriveDataTypeable, OverloadedStrings, QuasiQuotes #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -69,7 +70,9 @@ authOAuth oauth mkCreds = AuthPlugin name dispatch login setSession oauthSessionName $ lookupTokenSecret tok redirect $ authorizeUrl oauth' tok dispatch "GET" [] = do - Just tokSec <- lookupSession oauthSessionName + tokSec <- lookupSession oauthSessionName >>= \case + Just t -> return t + Nothing -> liftIO $ fail "lookupSession could not find session" deleteSession oauthSessionName reqTok <- if oauthVersion oauth == OAuth10 diff --git a/yesod-auth-oauth/yesod-auth-oauth.cabal b/yesod-auth-oauth/yesod-auth-oauth.cabal index f2e3f45e..713e43be 100644 --- a/yesod-auth-oauth/yesod-auth-oauth.cabal +++ b/yesod-auth-oauth/yesod-auth-oauth.cabal @@ -1,5 +1,5 @@ name: yesod-auth-oauth -version: 1.6.0 +version: 1.6.0.1 license: BSD3 license-file: LICENSE author: Hiromi Ishii diff --git a/yesod-auth/ChangeLog.md b/yesod-auth/ChangeLog.md index b09d1c26..194209cb 100644 --- a/yesod-auth/ChangeLog.md +++ b/yesod-auth/ChangeLog.md @@ -2,7 +2,7 @@ ## 1.6.5 -* Add support for persistent 2.9 [#1516](https://github.com/yesodweb/yesod/pull/1516) +* Add support for persistent 2.9 [#1516](https://github.com/yesodweb/yesod/pull/1516), [#1561](https://github.com/yesodweb/yesod/pull/1561) ## 1.6.4.1 diff --git a/yesod-persistent/ChangeLog.md b/yesod-persistent/ChangeLog.md index 3edf8e34..f6fbbec8 100644 --- a/yesod-persistent/ChangeLog.md +++ b/yesod-persistent/ChangeLog.md @@ -1,6 +1,6 @@ -## 1.6.1 +## 1.6.0.1 -* Add support for persistent 2.9 [#1516](https://github.com/yesodweb/yesod/pull/1516) +* Add support for persistent 2.9 [#1516](https://github.com/yesodweb/yesod/pull/1516), [#1561](https://github.com/yesodweb/yesod/pull/1561) ## 1.6.0 diff --git a/yesod-persistent/yesod-persistent.cabal b/yesod-persistent/yesod-persistent.cabal index 2af6550a..89842201 100644 --- a/yesod-persistent/yesod-persistent.cabal +++ b/yesod-persistent/yesod-persistent.cabal @@ -1,5 +1,5 @@ name: yesod-persistent -version: 1.6.1 +version: 1.6.0.1 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-static/ChangeLog.md b/yesod-static/ChangeLog.md index 0e30e941..9c79808a 100644 --- a/yesod-static/ChangeLog.md +++ b/yesod-static/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.6.0.1 + +* Make test suite build with GHC 8.6 [#1561](https://github.com/yesodweb/yesod/pull/1561) + ## 1.6.0 * Upgrade to yesod-core 1.6.0 diff --git a/yesod-static/test/EmbedProductionTest.hs b/yesod-static/test/EmbedProductionTest.hs index d7fcbc1d..33e3d719 100644 --- a/yesod-static/test/EmbedProductionTest.hs +++ b/yesod-static/test/EmbedProductionTest.hs @@ -1,4 +1,5 @@ {-# LANGUAGE TemplateHaskell, QuasiQuotes, TypeFamilies, OverloadedStrings #-} +{-# LANGUAGE LambdaCase #-} module EmbedProductionTest where -- Tests the production mode of the embedded static subsite by @@ -108,7 +109,9 @@ embedProductionSpecs = yesodSpec (MyApp eProduction) $ do yit "Embedded Javascript" $ do get HomeR statusIs 200 - [script] <- htmlQuery "script" + script <- htmlQuery "script" >>= \case + [s] -> return s + _ -> liftIO $ fail "Expected singleton list of script" let src = BL.takeWhile (/= 34) $ BL.drop 1 $ BL.dropWhile (/= 34) script -- 34 is " get $ TL.toStrict $ TL.decodeUtf8 src diff --git a/yesod-static/yesod-static.cabal b/yesod-static/yesod-static.cabal index d5df71e6..9da53c24 100644 --- a/yesod-static/yesod-static.cabal +++ b/yesod-static/yesod-static.cabal @@ -1,5 +1,5 @@ name: yesod-static -version: 1.6.0 +version: 1.6.0.1 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-test/ChangeLog.md b/yesod-test/ChangeLog.md index 42fd55e4..95ca253b 100644 --- a/yesod-test/ChangeLog.md +++ b/yesod-test/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.6.5.1 + +* Make test suite build with GHC 8.6 [#1561](https://github.com/yesodweb/yesod/pull/1561) + ## 1.6.5 bodyEquals prints out actual body in addition to expected body in failure msg [#1525](https://github.com/yesodweb/yesod/pull/1525) diff --git a/yesod-test/test/main.hs b/yesod-test/test/main.hs index b0b2ebe6..df6e7a5e 100644 --- a/yesod-test/test/main.hs +++ b/yesod-test/test/main.hs @@ -5,6 +5,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} @@ -482,8 +483,10 @@ postHomeR = defaultLayout postResourcesR :: Handler () postResourcesR = do - ([("foo", t)], _) <- runRequestBody - sendResponseCreated $ ResourceR t + t <- runRequestBody >>= \case + ([("foo", t)], _) -> return t + _ -> liftIO $ fail "postResourcesR pattern match failure" + sendResponseCreated $ ResourceR t getResourceR :: Text -> Handler Html getResourceR i = defaultLayout diff --git a/yesod-test/yesod-test.cabal b/yesod-test/yesod-test.cabal index 600ed2b3..f10dd0ca 100644 --- a/yesod-test/yesod-test.cabal +++ b/yesod-test/yesod-test.cabal @@ -1,5 +1,5 @@ name: yesod-test -version: 1.6.5 +version: 1.6.5.1 license: MIT license-file: LICENSE author: Nubis