@@ -12,11 +12,12 @@ import IRTS.CodegenCommon
1212import Util.Pretty
1313import Util.DynamicLinker
1414
15+import Idris.Colours
16+
1517import Paths_idris
1618
1719import System.Console.Haskeline
18−import System.Console.ANSI ( Color(..), ConsoleLayer(..), SGR(..), setSGRCode,
19− ColorIntensity(..), Underlining(..), ConsoleIntensity(..) )
20+
2021
2122import Control.Monad.Trans.State.Strict
2223
@@ -790,35 +791,6 @@ expandNS syn n = case syn_namespace syn of
790791
791792--- Pretty printing declarations and terms
792793
793−-- Set the colour of a string using POSIX escape codes
794−colourise :: Color -> ColorIntensity -> String -> String
795−colourise c i str = let sgr = [SetColor Foreground i c]
796− in setSGRCode sgr ++ str ++ setSGRCode [Reset]
797−
798−colouriseKwd :: String -> String
799−colouriseKwd kwd = setSGRCode [SetUnderlining SingleUnderline
800− , SetConsoleIntensity BoldIntensity
801− , SetColor Foreground Vivid Black
802− ] ++ kwd ++ setSGRCode [Reset]
803−
804−colouriseBound :: String -> String
805−colouriseBound = colourise Magenta Vivid
806−
807−colouriseImplicit :: String -> String
808−colouriseImplicit str = let sgr = [ SetColor Foreground Vivid Magenta
809− , SetUnderlining SingleUnderline
810− ]
811− in setSGRCode sgr ++ str ++ setSGRCode [Reset]
812−
813−colouriseFun :: String -> String
814−colouriseFun = colourise Green Vivid
815−
816−colouriseType :: String -> String
817−colouriseType = colourise Blue Vivid
818−
819−colouriseData :: String -> String
820−colouriseData = colourise Red Vivid
821−
822794instance Show PTerm where
823795 show tm = showImp Nothing False False tm
824796