wl-pprint-terminfo 0.2.0 → 0.2.1
raw patch · 2 files changed
+8/−22 lines, 2 filesdep ~terminfo
Dependency ranges changed: terminfo
Files
System/Console/Terminfo/PrettyPrint.hs view
@@ -54,21 +54,7 @@ import Control.Exception (finally) import System.IO (stdout) -newtype Colour = Colour { color :: Color } -instance Eq Colour where- Colour Black == Colour Black = True- Colour Red == Colour Red = True- Colour Green == Colour Green = True- Colour Yellow == Colour Yellow = True- Colour Blue == Colour Blue = True- Colour Magenta == Colour Magenta = True- Colour Cyan == Colour Cyan = True- Colour White == Colour White = True- Colour (ColorNumber n) == Colour (ColorNumber m) = n == m- _ == _ = False-- data ScopedEffect = Bold | Standout@@ -78,8 +64,8 @@ | Dim | Invisible | Protected- | Foreground Colour- | Background Colour+ | Foreground Color+ | Background Color | Else ScopedEffect ScopedEffect | Nop deriving (Eq)@@ -110,11 +96,11 @@ eval (Push (Foreground n)) = do modify (Foreground n:) f <- lift setForegroundColor- return $ f $ color n+ return (f n) eval (Push (Background n)) = do modify (Background n:) f <- lift setBackgroundColor- return $ f $ color n+ return (f n) eval (Push Invisible) = modify (Invisible:) *> lift invisibleOn eval (Push Dim) = modify (Dim:) *> lift dimOn eval (Push Underline) = modify (Underline:) *> lift enterUnderlineMode@@ -156,8 +142,8 @@ soft l = Else l Nop foreground, background :: Color -> TermDoc -> TermDoc-foreground n = with (soft (Foreground (Colour n)))-background n = with (soft (Background (Colour n)))+foreground n = with (soft (Foreground n))+background n = with (soft (Background n)) red, black, green, yellow, blue, magenta, cyan, white, blink, bold, underline, standout, reversed, protected, invisible, dim :: TermDoc -> TermDoc
wl-pprint-terminfo.cabal view
@@ -1,6 +1,6 @@ name: wl-pprint-terminfo category: Control, Monads, Text-version: 0.2.0+version: 0.2.1 cabal-version: >= 1.6 license: BSD3 license-file: LICENSE@@ -24,7 +24,7 @@ semigroups >= 0.6 && < 0.7, wl-pprint-extras >= 1.2 && < 1.3, hscurses >= 1.4 && < 1.5,- terminfo >= 0.3 && < 0.4,+ terminfo >= 0.3.2 && < 0.4, transformers >= 0.2.2 && < 0.3 exposed-modules: