created SubFix.Internal module
This commit is contained in:
parent
3674dc72c8
commit
f8a4f7e81c
|
@ -0,0 +1,57 @@
|
||||||
|
{-|
|
||||||
|
Module : SubFix.Internal
|
||||||
|
Description : core functions for subfix
|
||||||
|
Copyright : (C) Jonathan Lamothe
|
||||||
|
License : GPL-3
|
||||||
|
Maintainer : jonathan@jlamothe.net
|
||||||
|
|
||||||
|
= IMPORTANT:
|
||||||
|
|
||||||
|
THIS MODULE IS USED INTERNALLY AND MAY BE SUBJECT TO CHANGE WITHOUT
|
||||||
|
NOTICE!
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
-}
|
||||||
|
|
||||||
|
module SubFix.Internal (encodeTime, decodeTime, timestamp) where
|
||||||
|
|
||||||
|
-- | Encodes a timestamp from a number of milliseconds
|
||||||
|
encodeTime :: Integer -> String
|
||||||
|
encodeTime = undefined
|
||||||
|
|
||||||
|
-- | Decodes a timestamp to a number of milliseconds and the unused
|
||||||
|
-- input
|
||||||
|
decodeTime
|
||||||
|
:: String
|
||||||
|
-- ^ The encoded timestamp
|
||||||
|
-> Maybe (Integer, String)
|
||||||
|
-- ^ The number of milliseconds and unused input (if available)
|
||||||
|
decodeTime = undefined
|
||||||
|
|
||||||
|
-- | Converts hours, minutes, seconds and milliseconds into the total
|
||||||
|
-- number of milliseconds
|
||||||
|
timestamp
|
||||||
|
:: Integer
|
||||||
|
-- ^ Hours
|
||||||
|
-> Integer
|
||||||
|
-- ^ Minutes
|
||||||
|
-> Integer
|
||||||
|
-- ^ Seconds
|
||||||
|
-> Integer
|
||||||
|
-- ^ Milliseconds
|
||||||
|
-> Integer
|
||||||
|
timestamp = undefined
|
||||||
|
|
||||||
|
--jl
|
|
@ -4,7 +4,7 @@ cabal-version: 1.12
|
||||||
--
|
--
|
||||||
-- see: https://github.com/sol/hpack
|
-- see: https://github.com/sol/hpack
|
||||||
--
|
--
|
||||||
-- hash: 0bbe0a65faa072211284afd0838b32a74ded6fa51252fc0c023e92ba5da20c8f
|
-- hash: f83e79f4461abbbff9a3ec9abaae7602d26c2384e12b6f2236bc00dcca5ea136
|
||||||
|
|
||||||
name: subfix
|
name: subfix
|
||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
|
@ -30,6 +30,7 @@ source-repository head
|
||||||
library
|
library
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
SubFix
|
SubFix
|
||||||
|
SubFix.Internal
|
||||||
other-modules:
|
other-modules:
|
||||||
Paths_subfix
|
Paths_subfix
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
|
@ -56,6 +57,8 @@ test-suite subfix-test
|
||||||
main-is: Spec.hs
|
main-is: Spec.hs
|
||||||
other-modules:
|
other-modules:
|
||||||
SubFix.ConvertSpec
|
SubFix.ConvertSpec
|
||||||
|
SubFix.InternalSpec
|
||||||
|
SubFixSpec
|
||||||
Paths_subfix
|
Paths_subfix
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
test
|
test
|
||||||
|
|
|
@ -20,9 +20,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import Test.Hspec (hspec)
|
import Test.Hspec (hspec)
|
||||||
|
|
||||||
import qualified SubFix.ConvertSpec as Convert
|
import qualified SubFixSpec as SubFix
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = hspec Convert.spec
|
main = hspec SubFix.spec
|
||||||
|
|
||||||
--jl
|
--jl
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
{-
|
||||||
|
|
||||||
|
subfix
|
||||||
|
Copyright (C) Jonathan Lamothe <jonathan@jlamothe.net>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
-}
|
||||||
|
|
||||||
|
module SubFix.InternalSpec (spec) where
|
||||||
|
|
||||||
|
import Test.Hspec (Spec, describe)
|
||||||
|
|
||||||
|
spec :: Spec
|
||||||
|
spec = describe "Internal" $ return ()
|
||||||
|
|
||||||
|
--jl
|
|
@ -0,0 +1,34 @@
|
||||||
|
{-
|
||||||
|
|
||||||
|
subfix
|
||||||
|
Copyright (C) Jonathan Lamothe <jonathan@jlamothe.net>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
-}
|
||||||
|
|
||||||
|
module SubFixSpec (spec) where
|
||||||
|
|
||||||
|
import Test.Hspec (Spec, describe)
|
||||||
|
|
||||||
|
import qualified SubFix.InternalSpec as Internal
|
||||||
|
|
||||||
|
import qualified SubFix.ConvertSpec as Convert
|
||||||
|
|
||||||
|
spec :: Spec
|
||||||
|
spec = describe "SubFix" $ do
|
||||||
|
Internal.spec
|
||||||
|
Convert.spec
|
||||||
|
|
||||||
|
--jl
|
Loading…
Reference in New Issue
Block a user