Portability | GHC |
---|---|

Stability | highly unstable |

Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |

Utility functions

- class CMinMax a where
- within :: Eq a => CMinMax a => a -> a -> a -> Bool
- max3 :: Ord a => a -> a -> a -> a
- min3 :: Ord a => a -> a -> a -> a
- med3 :: Ord a => a -> a -> a -> a
- class Num a => PSUnit a where
- truncateDouble :: Double -> String
- roundup :: Double -> String
- clamp :: Ord a => a -> a -> a -> a
- ramp :: Double -> Double
- ramp255 :: Double -> Int
- mkTimeStamp :: IO String
- parens :: String -> String
- hsep :: [String] -> String
- commasep :: [String] -> String
- tupled :: [String] -> String
- sequenceA :: Applicative f => [f a] -> f [a]
- (<:>) :: Applicative f => f a -> f [a] -> f [a]
- data OneList a
- mkList2 :: a -> a -> OneList a
- onesmapM_ :: Monad m => (a -> m b) -> OneList a -> m ()
- toListWith :: (a -> b) -> OneList a -> [b]
- toListWithM :: Monad m => (a -> m b) -> OneList a -> m [b]
- fromListErr :: String -> [a] -> OneList a

# Component-wise min and max

# Three values

# Truncate / print a double

truncateDouble :: Double -> StringSource

Truncate the printed decimal representation of a Double.
The is prefered to `showFFloat`

from Numeric as it produces
shorter representations where appropriate.

- 000000000 becomes 0.0 rather than however many digs are specified.

# PostScript timetmap

mkTimeStamp :: IO StringSource

Generate a time stamp for the output files. Note PostScript does no interpretation of the time stamp, it is solely for information and so the representation is arbitrary.

# Pretty printers for strings

# Extras

sequenceA :: Applicative f => [f a] -> f [a]Source

Applicative version of (monadic) `sequence`

.
Because we use MonadLib we don't want to bring in
Control.Monad.Instances ()

(<:>) :: Applicative f => f a -> f [a] -> f [a]Source

Applicative `cons`

.

# One type - non-empty list type

toListWith :: (a -> b) -> OneList a -> [b]Source

toListWithM :: Monad m => (a -> m b) -> OneList a -> m [b]Source

fromListErr :: String -> [a] -> OneList aSource