on master help sign in
Clarify haddock for ANSI colors

We have to copy the Color.hs exports to Attributes.hs to be able to write haddocks, unfortunately

commited27311ba7fd8464f62fa859585f34d396877961 authorColby Jenn <colbymjenn@gmail.com> dateFri 7 Jun 2019, 00:35 (7 years ago) parentfc95860
2 files changed+31−3
src/Graphics/Vty/Attributes.hs+31−1 src/Graphics/Vty/Attributes/Color.hs−2
src/Graphics/Vty/Attributes.hs+31−1
@@ -58,7 +58,37 @@ module Graphics.Vty.Attributes
5858 , withURL
5959
6060 -- * Colors
61− , module Graphics.Vty.Attributes.Color
61+ , Color(..)
62+
63+ -- ** Fixed Colors
64+ -- | Standard 8-color ANSI terminal color codes.
65+ --
66+ -- Note that these map to colors in the terminal's custom palette. For
67+ -- instance, `white` maps to whatever the terminal color theme uses for
68+ -- white.
69+ --
70+ -- Use these functions if you want to make apps that fit the terminal theme.
71+ -- If you want access to more/stronger colors use
72+ -- `Graphics.Vty.Attributes.Color240.rgbColor`
73+ , black
74+ , red
75+ , green
76+ , yellow
77+ , blue
78+ , magenta
79+ , cyan
80+ , white
81+
82+ -- | Bright/Vivid variants of the standard 8-color ANSI
83+ , brightBlack
84+ , brightRed
85+ , brightGreen
86+ , brightYellow
87+ , brightBlue
88+ , brightMagenta
89+ , brightCyan
90+ , brightWhite
91+ -- ** Creating Colors From RGB
6292 , module Graphics.Vty.Attributes.Color240
6393 )
6494where
src/Graphics/Vty/Attributes/Color.hs−2
@@ -80,7 +80,6 @@ import Control.DeepSeq
8080data Color = ISOColor !Word8 | Color240 !Word8
8181 deriving ( Eq, Show, Read, Generic, NFData )
8282
83−-- | Standard 8-color ANSI terminal color codes.
8483black, red, green, yellow, blue, magenta, cyan, white :: Color
8584black = ISOColor 0
8685red = ISOColor 1
@@ -91,7 +90,6 @@ magenta= ISOColor 5
9190cyan = ISOColor 6
9291white = ISOColor 7
9392
94−-- | Bright/Vivid variants of the standard 8-color ANSI
9593brightBlack, brightRed, brightGreen, brightYellow :: Color
9694brightBlue, brightMagenta, brightCyan, brightWhite :: Color
9795brightBlack = ISOColor 8