Follow hlint suggestion: redundant <$>.
commitbb76a138fc0173dea81754edb6583218b73cba03
authorPhil de Joux <philderbeast@gmail.com>
dateSun 16 Oct 2022, 14:59 (4 years ago)
parent1a2385a
.hlint.yaml−1
@@ -2,7 +2,6 @@
22- ignore: {name: "Eta reduce"} # 6 hints
33- ignore: {name: "Move brackets to avoid $"} # 19 hints
44- ignore: {name: "Redundant $"} # 21 hints
5−- ignore: {name: "Redundant <$>"} # 1 hint
65- ignore: {name: "Redundant bracket"} # 121 hints
76- ignore: {name: "Redundant id"} # 1 hint
87- ignore: {name: "Redundant if"} # 1 hint
src/OddJobs/Types.hs+3−2
@@ -205,9 +205,10 @@ instance (StringConv Text a) => FromText (Either a Status) where
205205 x -> Left $ toS $ "Unknown job status: " <> x
206206
207207instance FromField Status where
208− fromField f mBS = (fromText <$> (fromField f mBS)) >>= \case
208+ fromField f mBS = fromField f mBS >>= (\case
209209 Left e -> FromField.returnError PGS.ConversionFailed f e
210− Right s -> pure s
210+ Right s -> pure s)
211+ . fromText
211212
212213instance ToField Status where
213214 toField s = toField $ toText s