1 -- For IsString (repr ())
2 {-# LANGUAGE UndecidableInstances #-}
4 module Symantic.Plaintext.Debug where
6 import Data.Function (($))
7 import Data.Semigroup ((<>))
8 import Data.String (IsString (..), String)
9 import Symantic.Plaintext.Classes
11 newtype XML repr a = XML {unXML :: repr a}
13 -- | For debugging purposes.
18 Colorable16 (XML repr)
20 reverse = xmlSGR "reverse"
21 black = xmlSGR "black"
23 green = xmlSGR "green"
24 yellow = xmlSGR "yellow"
26 magenta = xmlSGR "magenta"
28 white = xmlSGR "white"
29 blacker = xmlSGR "blacker"
30 redder = xmlSGR "redder"
31 greener = xmlSGR "greener"
32 yellower = xmlSGR "yellower"
33 bluer = xmlSGR "bluer"
34 magentaer = xmlSGR "magentaer"
35 cyaner = xmlSGR "cyaner"
36 whiter = xmlSGR "whiter"
37 onBlack = xmlSGR "onBlack"
38 onRed = xmlSGR "onRed"
39 onGreen = xmlSGR "onGreen"
40 onYellow = xmlSGR "onYellow"
41 onBlue = xmlSGR "onBlue"
42 onMagenta = xmlSGR "onMagenta"
43 onCyan = xmlSGR "onCyan"
44 onWhite = xmlSGR "onWhite"
45 onBlacker = xmlSGR "onBlacker"
46 onRedder = xmlSGR "onRedder"
47 onGreener = xmlSGR "onGreener"
48 onYellower = xmlSGR "onYellower"
49 onBluer = xmlSGR "onBluer"
50 onMagentaer = xmlSGR "onMagentaer"
51 onCyaner = xmlSGR "onCyaner"
52 onWhiter = xmlSGR "onWhiter"
56 ProductFunctor repr =>
62 fromString ("<" <> newSGR <> ">")
64 <. fromString ("</" <> newSGR <> ">")