Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- newtype T time label = Cons {}
- type Interval time label = ((time, time), label)
- empty :: T time label
- singleton :: (time, time) -> label -> T time label
- fromAdjacentChunks :: Num time => [(time, label)] -> T time label
- lift :: ([Interval time0 label0] -> [Interval time1 label1]) -> T time0 label0 -> T time1 label1
- lift2 :: ([Interval time0 label0] -> [Interval time1 label1] -> [Interval time2 label2]) -> T time0 label0 -> T time1 label1 -> T time2 label2
- formatTime :: RealFrac time => time -> String
- mapTime :: (time0 -> time1) -> T time0 label -> T time1 label
- realTimes :: Fractional time => time -> T Int String -> T time String
- writeFile :: RealFrac time => FilePath -> T time String -> IO ()
- writeFileInt :: RealFrac time => time -> FilePath -> T Int String -> IO ()
- parseTime :: Fractional time => String -> Maybe time
- readFile :: Fractional time => FilePath -> IO (T time String)
Documentation
fromAdjacentChunks :: Num time => [(time, label)] -> T time label Source
lift :: ([Interval time0 label0] -> [Interval time1 label1]) -> T time0 label0 -> T time1 label1 Source
lift2 :: ([Interval time0 label0] -> [Interval time1 label1] -> [Interval time2 label2]) -> T time0 label0 -> T time1 label1 -> T time2 label2 Source
formatTime :: RealFrac time => time -> String Source
Format the times using a comma, which is certainly only correct in German locale.
mapTime :: (time0 -> time1) -> T time0 label -> T time1 label Source
You must make sure, that the time mapping function preserves the order. This is not checked.
parseTime :: Fractional time => String -> Maybe time Source