diff options
Diffstat (limited to 'src/Util.hs')
| -rw-r--r-- | src/Util.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Util.hs b/src/Util.hs index ca31258..1e10eec 100644 --- a/src/Util.hs +++ b/src/Util.hs @@ -17,7 +17,7 @@ data YMDHMS = YMDHMS {-# UNPACK #-} !YMD data YMD = YMD {-# UNPACK #-} !Int {-# UNPACK #-} !Word8 -- ^ 1-based {-# UNPACK #-} !Word8 - deriving (Show) + deriving (Show, Eq, Ord) -- | Time-of-day in seconds, in unspecified time zone data HMS = HMS {-# UNPACK #-} !Word8 @@ -29,3 +29,6 @@ pad :: Show a => Char -> Int -> a -> String pad c w val = let s = show val in replicate (w - length s) c ++ s + +uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d +uncurry3 f (x, y, z) = f x y z |
