diff --git a/IHP/ApplicationContext.hs b/IHP/ApplicationContext.hs index f596e4768..bb0d66236 100644 --- a/IHP/ApplicationContext.hs +++ b/IHP/ApplicationContext.hs @@ -8,7 +8,7 @@ import IHP.FrameworkConfig (FrameworkConfig) data ApplicationContext = ApplicationContext { modelContext :: !ModelContext - , session :: Vault.Key (Session IO String String) - , autoRefreshServer :: IORef AutoRefreshServer - , frameworkConfig :: FrameworkConfig + , session :: !(Vault.Key (Session IO String String)) + , autoRefreshServer :: !(IORef AutoRefreshServer) + , frameworkConfig :: !FrameworkConfig } diff --git a/IHP/AutoRefresh/Types.hs b/IHP/AutoRefresh/Types.hs index 7578b7c02..3a4588b08 100644 --- a/IHP/AutoRefresh/Types.hs +++ b/IHP/AutoRefresh/Types.hs @@ -10,22 +10,22 @@ import IHP.Controller.RequestContext import Control.Concurrent.MVar (MVar) import Data.Set (Set) -data AutoRefreshState = AutoRefreshDisabled | AutoRefreshEnabled { sessionId :: UUID } +data AutoRefreshState = AutoRefreshDisabled | AutoRefreshEnabled { sessionId :: !UUID } data AutoRefreshSession = AutoRefreshSession - { id :: UUID + { id :: !UUID -- | A callback to rerun an action within a given request context - , renderView :: RequestContext -> IO () + , renderView :: !(RequestContext -> IO ()) -- | MVar that is filled whenever some table changed - , event :: MVar () + , event :: !(MVar ()) -- | All tables this auto refresh session watches - , tables :: Set ByteString + , tables :: !(Set ByteString) -- | The last rendered html of this action. Initially this is the result of the initial page rendering - , lastResponse :: LByteString + , lastResponse :: !LByteString -- | Keep track of the last ping to this session to close it after too much time has passed without anything happening - , lastPing :: UTCTime + , lastPing :: !UTCTime } -data AutoRefreshServer = AutoRefreshServer { sessions :: [AutoRefreshSession], subscribedTables :: Set ByteString } +data AutoRefreshServer = AutoRefreshServer { sessions :: ![AutoRefreshSession], subscribedTables :: !(Set ByteString) } newAutoRefreshServer :: AutoRefreshServer newAutoRefreshServer = AutoRefreshServer { sessions = [], subscribedTables = mempty } \ No newline at end of file diff --git a/IHP/FlashMessages/Types.hs b/IHP/FlashMessages/Types.hs index 7ced67b92..cd8be0291 100644 --- a/IHP/FlashMessages/Types.hs +++ b/IHP/FlashMessages/Types.hs @@ -9,5 +9,5 @@ module IHP.FlashMessages.Types import IHP.Prelude data FlashMessage - = SuccessFlashMessage Text - | ErrorFlashMessage Text \ No newline at end of file + = SuccessFlashMessage !Text + | ErrorFlashMessage !Text \ No newline at end of file diff --git a/IHP/Router/Types.hs b/IHP/Router/Types.hs index 612dddb9a..3a1c5d91f 100644 --- a/IHP/Router/Types.hs +++ b/IHP/Router/Types.hs @@ -13,9 +13,9 @@ import IHP.Prelude -- When opening @/ShowProject?projectId=ab55d579-80cd-4608-9a8f-c76dea6c2332@ everything is fine. -- But when opening @/ShowProject?projectId=not-an-uuid@ this exception will be thrown. data InvalidActionArgumentException = InvalidActionArgumentException - { expectedType :: ByteString - , value :: ByteString - , field :: ByteString + { expectedType :: !ByteString + , value :: !ByteString + , field :: !ByteString } deriving (Eq, Show) instance Exception InvalidActionArgumentException \ No newline at end of file