From f4f95e1494ea08033760f05cb3bbc02b985ab5f4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 3 Feb 2021 09:06:55 +0100 Subject: [PATCH] chore(profiling): restore prof-auto and test build Revert "chore(profiling): switch to prof-auto-top to hopefully fix build" This reverts commit 07bde5b0128bd2d2906f5a0cf0b8d138831adf74. --- src/Foundation/Authorization.hs | 2 +- src/Foundation/SiteLayout.hs | 1 + src/Foundation/Yesod/Middleware.hs | 2 +- src/Jobs.hs | 2 ++ src/Model/Types/TH/JSON.hs | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Foundation/Authorization.hs b/src/Foundation/Authorization.hs index 887242249..6c76bd8a9 100644 --- a/src/Foundation/Authorization.hs +++ b/src/Foundation/Authorization.hs @@ -1,5 +1,5 @@ {-# LANGUAGE UndecidableInstances #-} -{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints -fprof-auto #-} module Foundation.Authorization ( evalAccess, evalAccessFor, evalAccessWith diff --git a/src/Foundation/SiteLayout.hs b/src/Foundation/SiteLayout.hs index 8a6d86e2f..c21e114c5 100644 --- a/src/Foundation/SiteLayout.hs +++ b/src/Foundation/SiteLayout.hs @@ -1,4 +1,5 @@ {-# LANGUAGE UndecidableInstances #-} -- for `MemcachedKeyFavourites` +{-# OPTIONS_GHC -fprof-auto #-} module Foundation.SiteLayout ( siteLayout', siteLayout diff --git a/src/Foundation/Yesod/Middleware.hs b/src/Foundation/Yesod/Middleware.hs index c8967cfaa..df288f3be 100644 --- a/src/Foundation/Yesod/Middleware.hs +++ b/src/Foundation/Yesod/Middleware.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -O0 -fasm #-} +{-# OPTIONS_GHC -O0 -fasm -fprof-auto #-} module Foundation.Yesod.Middleware ( yesodMiddleware diff --git a/src/Jobs.hs b/src/Jobs.hs index 97c1e7a61..bb06b659c 100644 --- a/src/Jobs.hs +++ b/src/Jobs.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fprof-auto #-} + module Jobs ( module Types , module Jobs.Queue diff --git a/src/Model/Types/TH/JSON.hs b/src/Model/Types/TH/JSON.hs index 2e6720a44..d545df3eb 100644 --- a/src/Model/Types/TH/JSON.hs +++ b/src/Model/Types/TH/JSON.hs @@ -28,6 +28,7 @@ fromPersistValueJSON = \case PersistText text -> decodeBS $ Text.encodeUtf8 text x -> Left $ fromPersistValueErrorSql (Proxy @a) x where decodeBS = first pack . JSON.eitherDecodeStrict' +{-# SCC fromPersistValueJSON #-} sqlTypeJSON :: SqlType sqlTypeJSON = SqlOther "jsonb"