imported fquery-0.2
[fquery.git] / Adelie / Pretty.hs
blobd1a4ea4a4d1f6122f7303bc1adfadd14428365c6
1 -- Pretty.hs
2 --
3 -- Colourful output.
5 module Adelie.Pretty (
6 putCatName,
7 putCatNameLn,
8 putNum,
9 putNumLn
10 ) where
12 import Adelie.Colour
14 ----------------------------------------------------------------
16 putCatName, putCatNameLn :: (String, String) -> IO ()
17 putCatName = putCatName' off
18 putCatNameLn = putCatName' off2
20 putCatName' :: IO () -> (String, String) -> IO ()
21 putCatName' f (c, n) =
22 inYellow (putStr c) >> putChar '/' >> yellow >> putStr n >> f
24 ----------------------------------------------------------------
26 putNum, putNumLn :: Int -> IO ()
27 putNum = putNum' off
28 putNumLn = putNum' off2
30 putNum' :: IO () -> Int -> IO ()
31 putNum' f n = cyan >> putStr (show n) >> f