summaryrefslogtreecommitdiff
path: root/lib/Postdelay/TimeSpec/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Postdelay/TimeSpec/Utils.hs')
-rw-r--r--lib/Postdelay/TimeSpec/Utils.hs3
1 files changed, 3 insertions, 0 deletions
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)
35sign = label "sign" $ choice [ char '+' $> id 35sign = label "sign" $ choice [ char '+' $> id
36 , char '-' $> negateV 36 , char '-' $> negateV
37 ] 37 ]
38
39fromDigit :: Num n => Char -> n
40fromDigit c = fromIntegral $ fromEnum c - fromEnum '0'