-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A 'ten past six' style clock -- -- A clock and timer that tell the time in a more human way (the 'ten -- past six' style) @package fuzzytime @version 0.7.7 module FuzzyTime.Danish showFuzzyTimeDa :: FuzzyTime -> String module FuzzyTime.Dutch showFuzzyTimeNl :: FuzzyTime -> String module FuzzyTime.English showFuzzyTimeEn :: FuzzyTime -> String module FuzzyTime.French showFuzzyTimeFr :: FuzzyTime -> String module FuzzyTime.German showFuzzyTimeDe :: FuzzyTime -> String module FuzzyTime.Greek showFuzzyTimeEl :: FuzzyTime -> String module FuzzyTime.Italian showFuzzyTimeIt :: FuzzyTime -> String module FuzzyTime.Japanese showFuzzyTimeJa :: FuzzyTime -> String module FuzzyTime.Norwegian showFuzzyTimeNb :: FuzzyTime -> String module FuzzyTime.Polish showFuzzyTimePl :: FuzzyTime -> String module FuzzyTime.Spanish showFuzzyTimeEs :: FuzzyTime -> String module FuzzyTime.Swedish showFuzzyTimeSe :: FuzzyTime -> String module FuzzyTime.Turkish showFuzzyTimeTr :: FuzzyTime -> String -- | In this module the actual conversion from time to string happens. -- -- There are two modes, showing the time and showing the time left till -- something. This is represented by the duality of both FuzzyTimeConf -- and FuzzyTime: ClockConf and FuzzyClock serve to show the time, while -- TimerConf and FuzzyTimer are used for counting down. -- -- A FuzzyTime is created from a FuzzyTimeConf with toFuzzyTime. It is -- translated to a string via show. -- -- Apart from the above, two functions are exported: isTimerZero which -- can be used by an interface to set off the alarm when timer reaches -- zero, and nextFTHour which makes sure that the clock is a circular -- data structure. module FuzzyTime -- | Data for fuzzified time. There are two modes: FuzzyClock for showing -- what time it is and FuzzyTimer for showing how much time there is left -- till something. The String output is obtained via Show. data FuzzyTime FuzzyClock :: Bool -> Int -> Int -> Int -> String -> Int -> Int -> FuzzyTime ftAm :: FuzzyTime -> Bool ftCaps :: FuzzyTime -> Int ftClock :: FuzzyTime -> Int ftHour :: FuzzyTime -> Int ftLang :: FuzzyTime -> String ftMin :: FuzzyTime -> Int ftStyle :: FuzzyTime -> Int FuzzyTimer :: String -> Int -> FuzzyTime ftLang :: FuzzyTime -> String ftMins :: FuzzyTime -> Int -- | Capitalizes the string in one of the four ways: 0. all small; 1. -- default; 2. sentence case; 3. all caps capsizeDef :: Int -> String -> String -- | Turns a FuzzyTimeConf into a FuzzyTime. Works for both FuzzyClock and -- FuzzyTimer. In the clock mode, am (Bool), clock (12 vs. 24-hour), -- language and style are set apart from the actual time, so that show -- knows how to display the time. In the timer mode, only language and -- left minutes need to be set. toFuzzyTime :: FuzzyTimeConf -> FuzzyTime -- | Reports whether timer is now at zero. (Needed for the interface to -- know when to play a sound.) isTimerZero :: FuzzyTime -> Bool -- | Makes sure that noon is always represented as 0, and midnight – always -- as 0 or 24 (depending on the clock). nextFTHour :: FuzzyTime -> Int -- | Data for CmdArgs. Has the two modes of module FuzzyTime: showing the -- current time and showing the time left. Note that this is not the same -- as the two modes of module Main. data FuzzyTimeConf ClockConf :: Int -> Int -> String -> Int -> Time -> String -> Int -> FuzzyTimeConf caps :: FuzzyTimeConf -> Int clock :: FuzzyTimeConf -> Int lang :: FuzzyTimeConf -> String prec :: FuzzyTimeConf -> Int time :: FuzzyTimeConf -> Time sound :: FuzzyTimeConf -> String style :: FuzzyTimeConf -> Int TimerConf :: Time -> String -> Time -> FuzzyTimeConf end :: FuzzyTimeConf -> Time lang :: FuzzyTimeConf -> String now :: FuzzyTimeConf -> Time -- | Convenience alias. type Time = String instance Typeable FuzzyTimeConf instance Eq FuzzyTime instance Data FuzzyTimeConf instance Show FuzzyTimeConf instance Show FuzzyTime