Add CPP flags

This commit is contained in:
Sibi Prabakaran 2018-08-25 22:13:09 +05:30
parent 62944018d8
commit 9ea91909c2
No known key found for this signature in database
GPG Key ID: D19E3E0EBB557613
2 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP#-}
module Application
( getApplicationDev
, appMain
@ -81,7 +82,9 @@ makeApplication foundation = do
appPlain <- toWaiAppPlain foundation
let middleware = id -- prometheus def
#if !DEVELOPMENT
. forceSSL' (appSettings foundation)
#endif
. logWare
. defaultMiddlewaresNoLogging

View File

@ -1,3 +1,4 @@
{-# LANGUAGE CPP#-}
module Stackage.Database.Cron
( stackageServerCron
, newHoogleLocker
@ -107,6 +108,7 @@ stackageServerCron = do
}
createStackageDatabase dbfp
#if !DEVELOPMENT
db <- openStackageDatabase dbfp
do
@ -139,6 +141,7 @@ stackageServerCron = do
let dest = unpack key
createDirectoryIfMissing True $ takeDirectory dest
renamePath fp dest
#endif
createHoogleDB :: StackageDatabase -> Manager -> SnapName -> IO (Maybe FilePath)
createHoogleDB db man name = handleAny (\e -> print e $> Nothing) $ do