From ee87f8d3ecc2d23584e378bfd3160ba6f49ebf4a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 20 Feb 2017 20:47:31 +0100 Subject: Minor cleanup --- lib/Postdelay/TimeSpec.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Postdelay/TimeSpec.hs b/lib/Postdelay/TimeSpec.hs index 9361057..454f704 100644 --- a/lib/Postdelay/TimeSpec.hs +++ b/lib/Postdelay/TimeSpec.hs @@ -145,8 +145,8 @@ offsets reqSgn = fmap (foldMap . review $ prioEndo' Offset) $ (:) <$> offset req asOffset :: Time -> Endo LocalTime asOffset by = Endo $ flexDT.seconds' %~ (^+^ by) offset :: Bool -> m (Endo LocalTime) - offset sgnReq@(bool optSigned signed -> sgn) - = asOffset <$> lexeme (sgn timeLength) if sgnReq then "Signed time offset" else "Time offset" + offset (bool (optSigned, "Time offset") (signed, "Signed time offset") -> (sgn, desc)) + = asOffset <$> lexeme (sgn timeLength) desc timeZone :: (StringParser s m, MonadIO m) => m (Either TimeZone TZ) timeZone = label "Timezone" $ (Left <$> numericTimezone) <|> (Right <$> namedTimezone) -- cgit v1.2.3