From 5b09b096e38ed231b62df57736e87c989b481b5d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Feb 2017 18:17:26 +0100 Subject: Purely relative time specifications --- lib/Postdelay/TimeSpec/Utils.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/Postdelay/TimeSpec/Utils.hs') diff --git a/lib/Postdelay/TimeSpec/Utils.hs b/lib/Postdelay/TimeSpec/Utils.hs index e4ba732..85ac299 100644 --- a/lib/Postdelay/TimeSpec/Utils.hs +++ b/lib/Postdelay/TimeSpec/Utils.hs @@ -7,8 +7,10 @@ import Control.Monad import Control.Lens import Data.Time +import Data.Time.Lens import Data.Time.Zones +import Data.Functor import Data.AdditiveGroup import Text.Megaparsec @@ -30,6 +32,6 @@ signed = (<*>) (lexeme sign) optSigned = (<*>) (option id $ lexeme sign) sign :: (StringParser s m, AdditiveGroup n) => m (n -> n) -sign = choice [ id <$ char '+' - , negateV <$ char '-' - ] +sign = label "sign" $ choice [ char '+' $> id + , char '-' $> negateV + ] -- cgit v1.2.3