module Language.Haskell.HsColour.TTY (hscolour,hscolourG) where
import Language.Haskell.HsColour.ANSI as ANSI
import Language.Haskell.HsColour.Classify
import Language.Haskell.HsColour.Colourise
import Language.Haskell.HsColour.Output(TerminalType(Ansi16Colour))
hscolour :: ColourPrefs
-> String
-> String
hscolour = hscolourG Ansi16Colour
hscolourG terminalType pref = concatMap (renderTokenG terminalType pref) . tokenise
renderToken :: ColourPrefs -> (TokenType,String) -> String
renderToken = renderTokenG Ansi16Colour
renderTokenG terminalType pref (t,s) = ANSI.highlightG terminalType (colourise pref t) s