From 0a3efc56732f79304845a6e6d381c793f38e6c2c Mon Sep 17 00:00:00 2001 From: Daniel Gnoutcheff Date: Tue, 25 Jan 2022 20:04:10 -0500 Subject: Port to stack and stackage lts-16.31 --- Foundation.hs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'Foundation.hs') diff --git a/Foundation.hs b/Foundation.hs index c3c8cf0..46faef1 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE ViewPatterns #-} + module Foundation where import Prelude @@ -85,12 +87,6 @@ instance Yesod App where $(widgetFile "default-layout") giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") - -- This is done to provide an optimization for serving static files from - -- a separate domain. Please see the staticRoot setting in Settings.hs - urlRenderOverride y (StaticR s) = - Just $ uncurry (joinPath y (Settings.staticRoot $ settings y)) $ renderRoute s - urlRenderOverride _ _ = Nothing - -- Routes not requiring authenitcation. isAuthorized FaviconR _ = return Authorized isAuthorized RobotsR _ = return Authorized @@ -114,8 +110,8 @@ instance Yesod App where -- What messages should be logged. The following includes all messages when -- in development, and warnings and errors in production. - shouldLog _ _source level = - development || level == LevelWarn || level == LevelError + shouldLogIO _ _source level = return $ + development || level == LevelWarn || level == LevelError makeLogger = return . appLogger -- cgit v1.2.3