@@ -12,11 +12,12 @@ import IRTS.CodegenCommon
12import Util.Pretty
12import Util.Pretty
13import Util.DynamicLinker
13import Util.DynamicLinker
15import Paths_idris
17import Paths_idris
17import System.Console.Haskeline
19import System.Console.Haskeline
18−import System.Console.ANSI ( Color(..), ConsoleLayer(..), SGR(..), setSGRCode,
20+
19− ColorIntensity(..), Underlining(..), ConsoleIntensity(..) )
21import Control.Monad.Trans.State.Strict
22import Control.Monad.Trans.State.Strict
@@ -790,35 +791,6 @@ expandNS syn n = case syn_namespace syn of
791--- Pretty printing declarations and terms
792--- Pretty printing declarations and terms
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]
798−colouriseKwd :: String -> String
799−colouriseKwd kwd = setSGRCode [SetUnderlining SingleUnderline
800− , SetConsoleIntensity BoldIntensity
801− , SetColor Foreground Vivid Black
802− ] ++ kwd ++ setSGRCode [Reset]
804−colouriseBound :: String -> String
805−colouriseBound = colourise Magenta Vivid
807−colouriseImplicit :: String -> String
808−colouriseImplicit str = let sgr = [ SetColor Foreground Vivid Magenta
809− , SetUnderlining SingleUnderline
811− in setSGRCode sgr ++ str ++ setSGRCode [Reset]
813−colouriseFun :: String -> String
814−colouriseFun = colourise Green Vivid
816−colouriseType :: String -> String
817−colouriseType = colourise Blue Vivid
819−colouriseData :: String -> String
820−colouriseData = colourise Red Vivid
822instance Show PTerm where
794instance Show PTerm where
823 show tm = showImp Nothing False False tm
795 show tm = showImp Nothing False False tm