on master help sign in
Follow hlint suggestion: use const.
commit31006ef30fc468bb81f9232645ee70848ba50092 authorPhil de Joux <philderbeast@gmail.com> dateSun 16 Oct 2022, 15:12 (4 years ago) parentd059338
2 files changed+2−3
.hlint.yaml−1 src/OddJobs/Endpoints.hs+2−2
.hlint.yaml−1
@@ -8,7 +8,6 @@
88- ignore: {name: "Replace case with fromMaybe"} # 2 hints
99- ignore: {name: "Use <$>"} # 6 hints
1010- ignore: {name: "Use asks"} # 12 hints
11−- ignore: {name: "Use const"} # 2 hints
1211- ignore: {name: "Use if"} # 1 hint
1312- ignore: {name: "Use join"} # 1 hint
1413- ignore: {name: "Use lambda-case"} # 5 hints
src/OddJobs/Endpoints.hs+2−2
@@ -136,7 +136,7 @@ refreshJobRunners :: UIConfig
136136 -> Handler NoContent
137137refreshJobRunners cfg@UIConfig{} Env{envRoutes=Web.Routes{..}, envJobRunnersRef} = do
138138 allJobRunners <- fetchAllJobRunners cfg
139− atomicModifyIORef' envJobRunnersRef (\_ -> (allJobRunners, ()))
139+ atomicModifyIORef' envJobRunnersRef (const (allJobRunners, ()))
140140 throwError $ err302{errHeaders=[("Location", toS $ rFilterResults Nothing)]}
141141
142142refreshJobTypes :: UIConfig
@@ -144,7 +144,7 @@ refreshJobTypes :: UIConfig
144144 -> Handler NoContent
145145refreshJobTypes cfg Env{envRoutes=Web.Routes{..}, envJobTypesRef} = do
146146 allJobTypes <- fetchAllJobTypes cfg
147− atomicModifyIORef' envJobTypesRef (\_ -> (allJobTypes, ()))
147+ atomicModifyIORef' envJobTypesRef (const (allJobTypes, ()))
148148 throwError $ err302{errHeaders=[("Location", toS $ rFilterResults Nothing)]}
149149
150150cancelJob :: UIConfig