From 4f567546bb179c9cb88ccca65940a9e6785612c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hamal=20Dvo=C5=99=C3=A1k?= <mordae@anilinux.org> Date: Tue, 8 Jun 2021 12:27:01 +0200 Subject: [PATCH] Use strict fields where appropriate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Hamal Dvořák <mordae@anilinux.org> --- lib/Hikaru/Action.hs | 26 +++++++++++++------------- lib/Hikaru/Media.hs | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/Hikaru/Action.hs b/lib/Hikaru/Action.hs index 17f0289..71cf179 100644 --- a/lib/Hikaru/Action.hs +++ b/lib/Hikaru/Action.hs @@ -175,9 +175,9 @@ where -- data AbortAction = AbortAction - { status :: Status + { status :: !Status , headers :: [Header] - , message :: Text + , message :: !Text } deriving (Show, Generic) @@ -222,17 +222,17 @@ where data ActionEnv = ActionEnv { aeRequest :: Request - , aeBody :: IORef RequestBody - , aeRespStatus :: IORef Status - , aeRespHeaders :: IORef ResponseHeaders - , aeRespMaker :: IORef ResponseMaker - , aeFinalize :: IORef (IO ()) - , aeBodyLimit :: IORef Int64 - , aeBodyCounter :: IORef Int64 - , aeLanguages :: IORef [Text] - , aeCache :: IORef (Map.Map Text Dynamic) - , aeMsgLimit :: IORef Int64 - , aeFrameLimit :: IORef Int64 + , aeBody :: !(IORef RequestBody) + , aeRespStatus :: !(IORef Status) + , aeRespHeaders :: !(IORef ResponseHeaders) + , aeRespMaker :: !(IORef ResponseMaker) + , aeFinalize :: !(IORef (IO ())) + , aeBodyLimit :: !(IORef Int64) + , aeBodyCounter :: !(IORef Int64) + , aeLanguages :: !(IORef [Text]) + , aeCache :: !(IORef (Map.Map Text Dynamic)) + , aeMsgLimit :: !(IORef Int64) + , aeFrameLimit :: !(IORef Int64) } diff --git a/lib/Hikaru/Media.hs b/lib/Hikaru/Media.hs index 5ba79c3..cc77e17 100644 --- a/lib/Hikaru/Media.hs +++ b/lib/Hikaru/Media.hs @@ -41,10 +41,10 @@ where -- data Media = Media - { mainType :: Text - , subType :: Text + { mainType :: !Text + , subType :: !Text , params :: [(Text, Text)] - , quality :: Float + , quality :: !Float } deriving (Show, Eq, Ord, Generic) -- GitLab