diff options
author | Gregor Kleen <aethoago@141.li> | 2017-02-15 18:17:26 +0100 |
---|---|---|
committer | Gregor Kleen <aethoago@141.li> | 2017-02-15 18:17:26 +0100 |
commit | 5b09b096e38ed231b62df57736e87c989b481b5d (patch) | |
tree | 3319c041140f1cb6e052cc44bd79f3868180e3e9 /lib/Postdelay/TimeSpec/Utils.hs | |
parent | ee09f262f9b8c7c6a4042071cdfff3e22adbef86 (diff) | |
download | postdelay-5b09b096e38ed231b62df57736e87c989b481b5d.tar postdelay-5b09b096e38ed231b62df57736e87c989b481b5d.tar.gz postdelay-5b09b096e38ed231b62df57736e87c989b481b5d.tar.bz2 postdelay-5b09b096e38ed231b62df57736e87c989b481b5d.tar.xz postdelay-5b09b096e38ed231b62df57736e87c989b481b5d.zip |
Purely relative time specifications
Diffstat (limited to 'lib/Postdelay/TimeSpec/Utils.hs')
-rw-r--r-- | lib/Postdelay/TimeSpec/Utils.hs | 8 |
1 files changed, 5 insertions, 3 deletions
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 | |||
7 | import Control.Lens | 7 | import Control.Lens |
8 | 8 | ||
9 | import Data.Time | 9 | import Data.Time |
10 | import Data.Time.Lens | ||
10 | import Data.Time.Zones | 11 | import Data.Time.Zones |
11 | 12 | ||
13 | import Data.Functor | ||
12 | import Data.AdditiveGroup | 14 | import Data.AdditiveGroup |
13 | 15 | ||
14 | import Text.Megaparsec | 16 | import Text.Megaparsec |
@@ -30,6 +32,6 @@ signed = (<*>) (lexeme sign) | |||
30 | optSigned = (<*>) (option id $ lexeme sign) | 32 | optSigned = (<*>) (option id $ lexeme sign) |
31 | 33 | ||
32 | sign :: (StringParser s m, AdditiveGroup n) => m (n -> n) | 34 | sign :: (StringParser s m, AdditiveGroup n) => m (n -> n) |
33 | sign = choice [ id <$ char '+' | 35 | sign = label "sign" $ choice [ char '+' $> id |
34 | , negateV <$ char '-' | 36 | , char '-' $> negateV |
35 | ] | 37 | ] |