From 127c1212d7704392363e3614f339627bf514cfcf Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Feb 2017 19:04:57 +0100 Subject: Timezones --- lib/Postdelay/TimeSpec/Utils.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Postdelay/TimeSpec/Utils.hs') diff --git a/lib/Postdelay/TimeSpec/Utils.hs b/lib/Postdelay/TimeSpec/Utils.hs index 85ac299..83a271d 100644 --- a/lib/Postdelay/TimeSpec/Utils.hs +++ b/lib/Postdelay/TimeSpec/Utils.hs @@ -35,3 +35,6 @@ sign :: (StringParser s m, AdditiveGroup n) => m (n -> n) sign = label "sign" $ choice [ char '+' $> id , char '-' $> negateV ] + +fromDigit :: Num n => Char -> n +fromDigit c = fromIntegral $ fromEnum c - fromEnum '0' -- cgit v1.2.3