From c7d41f2395cd2fecb8f47756bb2eaea09e01f128 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 22 Mar 2015 14:05:24 +0200 Subject: [PATCH] Scaffold updates --- yesod-bin/hsfiles/minimal.hsfiles | 17 +++++- yesod-bin/hsfiles/mongo.hsfiles | 51 ++++++++++++++---- yesod-bin/hsfiles/mysql.hsfiles | 51 ++++++++++++++---- yesod-bin/hsfiles/postgres-fay.hsfiles | 73 +++++++++++++++++++------- yesod-bin/hsfiles/postgres.hsfiles | 73 +++++++++++++++++++------- yesod-bin/hsfiles/simple.hsfiles | 41 +++++++++++++-- yesod-bin/hsfiles/sqlite.hsfiles | 53 +++++++++++++++---- yesod-bin/yesod-bin.cabal | 2 +- 8 files changed, 288 insertions(+), 73 deletions(-) diff --git a/yesod-bin/hsfiles/minimal.hsfiles b/yesod-bin/hsfiles/minimal.hsfiles index 3b9384b9..cb07eee4 100644 --- a/yesod-bin/hsfiles/minimal.hsfiles +++ b/yesod-bin/hsfiles/minimal.hsfiles @@ -7,7 +7,22 @@ {-# START_FILE .ghci #-} :set -i.:config:dist/build/autogen :set -DDEVELOPMENT -:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable +:set -XCPP +:set -XDeriveDataTypeable +:set -XEmptyDataDecls +:set -XFlexibleContexts +:set -XGADTs +:set -XGeneralizedNewtypeDeriving +:set -XMultiParamTypeClasses +:set -XNoImplicitPrelude +:set -XNoMonomorphismRestriction +:set -XOverloadedStrings +:set -XQuasiQuotes +:set -XRecordWildCards +:set -XTemplateHaskell +:set -XTupleSections +:set -XTypeFamilies +:set -XViewPatterns {-# START_FILE .gitignore #-} dist* diff --git a/yesod-bin/hsfiles/mongo.hsfiles b/yesod-bin/hsfiles/mongo.hsfiles index 72009845..f810c380 100644 --- a/yesod-bin/hsfiles/mongo.hsfiles +++ b/yesod-bin/hsfiles/mongo.hsfiles @@ -7,7 +7,22 @@ {-# START_FILE .ghci #-} :set -i.:config:dist/build/autogen :set -DDEVELOPMENT -:set -XCPP -XTemplateHaskell -XQuasiQuotes -XTypeFamilies -XFlexibleContexts -XGADTs -XOverloadedStrings -XMultiParamTypeClasses -XGeneralizedNewtypeDeriving -XEmptyDataDecls -XDeriveDataTypeable +:set -XCPP +:set -XDeriveDataTypeable +:set -XEmptyDataDecls +:set -XFlexibleContexts +:set -XGADTs +:set -XGeneralizedNewtypeDeriving +:set -XMultiParamTypeClasses +:set -XNoImplicitPrelude +:set -XNoMonomorphismRestriction +:set -XOverloadedStrings +:set -XQuasiQuotes +:set -XRecordWildCards +:set -XTemplateHaskell +:set -XTupleSections +:set -XTypeFamilies +:set -XViewPatterns {-# START_FILE .gitignore #-} dist* @@ -231,7 +246,7 @@ instance Yesod App where -- Store session data on the client in encrypted cookies, -- default session idle timeout is 120 minutes - makeSessionBackend _ = fmap Just $ defaultClientSessionBackend + makeSessionBackend _ = Just <$> defaultClientSessionBackend 120 -- timeout in minutes "config/client_session_key.aes" @@ -312,11 +327,10 @@ instance YesodAuth App where x <- getBy $ UniqueUser $ credsIdent creds case x of Just (Entity uid _) -> return $ Just uid - Nothing -> do - fmap Just $ insert User - { userIdent = credsIdent creds - , userPassword = Nothing - } + Nothing -> Just <$> insert User + { userIdent = credsIdent creds + , userPassword = Nothing + } -- You can add other plugins like BrowserID, email or OAuth here authPlugins _ = [authBrowserId def] @@ -504,7 +518,7 @@ library , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 - , monad-control >= 0.3 && < 0.4 + , monad-control >= 0.3 && < 1.1 , wai-extra >= 3.0 && < 3.1 , yaml >= 0.8 && < 0.9 , http-conduit >= 2.1 && < 2.2 @@ -514,7 +528,7 @@ library , aeson >= 0.6 && < 0.9 , conduit >= 1.0 && < 2.0 , monad-logger >= 0.3 && < 0.4 - , fast-logger >= 2.2 && < 2.3 + , fast-logger >= 2.2 && < 2.4 , wai-logger >= 2.2 && < 2.3 , file-embed , safe @@ -564,6 +578,7 @@ test-suite test , persistent-mongoDB , resourcet , monad-logger + , shakespeare , transformers , hspec >= 2.0.0 , classy-prelude @@ -8997,6 +9012,7 @@ $maybe msg <- mmsg
  • If you had javascript enabled then you wouldn't be seeing this. +
  • This is an example trivial Form. Read the # \Forms chapter # @@ -9008,6 +9024,7 @@ $maybe msg <- mmsg ^{formWidget}