#include "Common-Safe-Haskell.hs"
module System.Console.ANSI.Types
(
SGR (..)
, ConsoleLayer (..)
, Color (..)
, ColorIntensity (..)
, ConsoleIntensity (..)
, Underlining (..)
, BlinkSpeed (..)
, xterm6LevelRGB
, xterm24LevelGray
, xtermSystem
) where
import Data.Ix (Ix)
import Data.Word (Word8)
import Data.Colour (Colour)
data Color = Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
| White
deriving (Color -> Color -> Bool
(Color -> Color -> Bool) -> (Color -> Color -> Bool) -> Eq Color
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Color -> Color -> Bool
$c/= :: Color -> Color -> Bool
== :: Color -> Color -> Bool
$c== :: Color -> Color -> Bool
Eq, Eq Color
Eq Color
-> (Color -> Color -> Ordering)
-> (Color -> Color -> Bool)
-> (Color -> Color -> Bool)
-> (Color -> Color -> Bool)
-> (Color -> Color -> Bool)
-> (Color -> Color -> Color)
-> (Color -> Color -> Color)
-> Ord Color
Color -> Color -> Bool
Color -> Color -> Ordering
Color -> Color -> Color
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Color -> Color -> Color
$cmin :: Color -> Color -> Color
max :: Color -> Color -> Color
$cmax :: Color -> Color -> Color
>= :: Color -> Color -> Bool
$c>= :: Color -> Color -> Bool
> :: Color -> Color -> Bool
$c> :: Color -> Color -> Bool
<= :: Color -> Color -> Bool
$c<= :: Color -> Color -> Bool
< :: Color -> Color -> Bool
$c< :: Color -> Color -> Bool
compare :: Color -> Color -> Ordering
$ccompare :: Color -> Color -> Ordering
$cp1Ord :: Eq Color
Ord, Color
Color -> Color -> Bounded Color
forall a. a -> a -> Bounded a
maxBound :: Color
$cmaxBound :: Color
minBound :: Color
$cminBound :: Color
Bounded, Int -> Color
Color -> Int
Color -> [Color]
Color -> Color
Color -> Color -> [Color]
Color -> Color -> Color -> [Color]
(Color -> Color)
-> (Color -> Color)
-> (Int -> Color)
-> (Color -> Int)
-> (Color -> [Color])
-> (Color -> Color -> [Color])
-> (Color -> Color -> [Color])
-> (Color -> Color -> Color -> [Color])
-> Enum Color
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Color -> Color -> Color -> [Color]
$cenumFromThenTo :: Color -> Color -> Color -> [Color]
enumFromTo :: Color -> Color -> [Color]
$cenumFromTo :: Color -> Color -> [Color]
enumFromThen :: Color -> Color -> [Color]
$cenumFromThen :: Color -> Color -> [Color]
enumFrom :: Color -> [Color]
$cenumFrom :: Color -> [Color]
fromEnum :: Color -> Int
$cfromEnum :: Color -> Int
toEnum :: Int -> Color
$ctoEnum :: Int -> Color
pred :: Color -> Color
$cpred :: Color -> Color
succ :: Color -> Color
$csucc :: Color -> Color
Enum, Int -> Color -> ShowS
[Color] -> ShowS
Color -> String
(Int -> Color -> ShowS)
-> (Color -> String) -> ([Color] -> ShowS) -> Show Color
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Color] -> ShowS
$cshowList :: [Color] -> ShowS
show :: Color -> String
$cshow :: Color -> String
showsPrec :: Int -> Color -> ShowS
$cshowsPrec :: Int -> Color -> ShowS
Show, ReadPrec [Color]
ReadPrec Color
Int -> ReadS Color
ReadS [Color]
(Int -> ReadS Color)
-> ReadS [Color]
-> ReadPrec Color
-> ReadPrec [Color]
-> Read Color
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Color]
$creadListPrec :: ReadPrec [Color]
readPrec :: ReadPrec Color
$creadPrec :: ReadPrec Color
readList :: ReadS [Color]
$creadList :: ReadS [Color]
readsPrec :: Int -> ReadS Color
$creadsPrec :: Int -> ReadS Color
Read, Ord Color
Ord Color
-> ((Color, Color) -> [Color])
-> ((Color, Color) -> Color -> Int)
-> ((Color, Color) -> Color -> Int)
-> ((Color, Color) -> Color -> Bool)
-> ((Color, Color) -> Int)
-> ((Color, Color) -> Int)
-> Ix Color
(Color, Color) -> Int
(Color, Color) -> [Color]
(Color, Color) -> Color -> Bool
(Color, Color) -> Color -> Int
forall a.
Ord a
-> ((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
unsafeRangeSize :: (Color, Color) -> Int
$cunsafeRangeSize :: (Color, Color) -> Int
rangeSize :: (Color, Color) -> Int
$crangeSize :: (Color, Color) -> Int
inRange :: (Color, Color) -> Color -> Bool
$cinRange :: (Color, Color) -> Color -> Bool
unsafeIndex :: (Color, Color) -> Color -> Int
$cunsafeIndex :: (Color, Color) -> Color -> Int
index :: (Color, Color) -> Color -> Int
$cindex :: (Color, Color) -> Color -> Int
range :: (Color, Color) -> [Color]
$crange :: (Color, Color) -> [Color]
$cp1Ix :: Ord Color
Ix)
data ColorIntensity = Dull
| Vivid
deriving (ColorIntensity -> ColorIntensity -> Bool
(ColorIntensity -> ColorIntensity -> Bool)
-> (ColorIntensity -> ColorIntensity -> Bool) -> Eq ColorIntensity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColorIntensity -> ColorIntensity -> Bool
$c/= :: ColorIntensity -> ColorIntensity -> Bool
== :: ColorIntensity -> ColorIntensity -> Bool
$c== :: ColorIntensity -> ColorIntensity -> Bool
Eq, Eq ColorIntensity
Eq ColorIntensity
-> (ColorIntensity -> ColorIntensity -> Ordering)
-> (ColorIntensity -> ColorIntensity -> Bool)
-> (ColorIntensity -> ColorIntensity -> Bool)
-> (ColorIntensity -> ColorIntensity -> Bool)
-> (ColorIntensity -> ColorIntensity -> Bool)
-> (ColorIntensity -> ColorIntensity -> ColorIntensity)
-> (ColorIntensity -> ColorIntensity -> ColorIntensity)
-> Ord ColorIntensity
ColorIntensity -> ColorIntensity -> Bool
ColorIntensity -> ColorIntensity -> Ordering
ColorIntensity -> ColorIntensity -> ColorIntensity
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ColorIntensity -> ColorIntensity -> ColorIntensity
$cmin :: ColorIntensity -> ColorIntensity -> ColorIntensity
max :: ColorIntensity -> ColorIntensity -> ColorIntensity
$cmax :: ColorIntensity -> ColorIntensity -> ColorIntensity
>= :: ColorIntensity -> ColorIntensity -> Bool
$c>= :: ColorIntensity -> ColorIntensity -> Bool
> :: ColorIntensity -> ColorIntensity -> Bool
$c> :: ColorIntensity -> ColorIntensity -> Bool
<= :: ColorIntensity -> ColorIntensity -> Bool
$c<= :: ColorIntensity -> ColorIntensity -> Bool
< :: ColorIntensity -> ColorIntensity -> Bool
$c< :: ColorIntensity -> ColorIntensity -> Bool
compare :: ColorIntensity -> ColorIntensity -> Ordering
$ccompare :: ColorIntensity -> ColorIntensity -> Ordering
$cp1Ord :: Eq ColorIntensity
Ord, ColorIntensity
ColorIntensity -> ColorIntensity -> Bounded ColorIntensity
forall a. a -> a -> Bounded a
maxBound :: ColorIntensity
$cmaxBound :: ColorIntensity
minBound :: ColorIntensity
$cminBound :: ColorIntensity
Bounded, Int -> ColorIntensity
ColorIntensity -> Int
ColorIntensity -> [ColorIntensity]
ColorIntensity -> ColorIntensity
ColorIntensity -> ColorIntensity -> [ColorIntensity]
ColorIntensity
-> ColorIntensity -> ColorIntensity -> [ColorIntensity]
(ColorIntensity -> ColorIntensity)
-> (ColorIntensity -> ColorIntensity)
-> (Int -> ColorIntensity)
-> (ColorIntensity -> Int)
-> (ColorIntensity -> [ColorIntensity])
-> (ColorIntensity -> ColorIntensity -> [ColorIntensity])
-> (ColorIntensity -> ColorIntensity -> [ColorIntensity])
-> (ColorIntensity
-> ColorIntensity -> ColorIntensity -> [ColorIntensity])
-> Enum ColorIntensity
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: ColorIntensity
-> ColorIntensity -> ColorIntensity -> [ColorIntensity]
$cenumFromThenTo :: ColorIntensity
-> ColorIntensity -> ColorIntensity -> [ColorIntensity]
enumFromTo :: ColorIntensity -> ColorIntensity -> [ColorIntensity]
$cenumFromTo :: ColorIntensity -> ColorIntensity -> [ColorIntensity]
enumFromThen :: ColorIntensity -> ColorIntensity -> [ColorIntensity]
$cenumFromThen :: ColorIntensity -> ColorIntensity -> [ColorIntensity]
enumFrom :: ColorIntensity -> [ColorIntensity]
$cenumFrom :: ColorIntensity -> [ColorIntensity]
fromEnum :: ColorIntensity -> Int
$cfromEnum :: ColorIntensity -> Int
toEnum :: Int -> ColorIntensity
$ctoEnum :: Int -> ColorIntensity
pred :: ColorIntensity -> ColorIntensity
$cpred :: ColorIntensity -> ColorIntensity
succ :: ColorIntensity -> ColorIntensity
$csucc :: ColorIntensity -> ColorIntensity
Enum, Int -> ColorIntensity -> ShowS
[ColorIntensity] -> ShowS
ColorIntensity -> String
(Int -> ColorIntensity -> ShowS)
-> (ColorIntensity -> String)
-> ([ColorIntensity] -> ShowS)
-> Show ColorIntensity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ColorIntensity] -> ShowS
$cshowList :: [ColorIntensity] -> ShowS
show :: ColorIntensity -> String
$cshow :: ColorIntensity -> String
showsPrec :: Int -> ColorIntensity -> ShowS
$cshowsPrec :: Int -> ColorIntensity -> ShowS
Show, ReadPrec [ColorIntensity]
ReadPrec ColorIntensity
Int -> ReadS ColorIntensity
ReadS [ColorIntensity]
(Int -> ReadS ColorIntensity)
-> ReadS [ColorIntensity]
-> ReadPrec ColorIntensity
-> ReadPrec [ColorIntensity]
-> Read ColorIntensity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ColorIntensity]
$creadListPrec :: ReadPrec [ColorIntensity]
readPrec :: ReadPrec ColorIntensity
$creadPrec :: ReadPrec ColorIntensity
readList :: ReadS [ColorIntensity]
$creadList :: ReadS [ColorIntensity]
readsPrec :: Int -> ReadS ColorIntensity
$creadsPrec :: Int -> ReadS ColorIntensity
Read, Ord ColorIntensity
Ord ColorIntensity
-> ((ColorIntensity, ColorIntensity) -> [ColorIntensity])
-> ((ColorIntensity, ColorIntensity) -> ColorIntensity -> Int)
-> ((ColorIntensity, ColorIntensity) -> ColorIntensity -> Int)
-> ((ColorIntensity, ColorIntensity) -> ColorIntensity -> Bool)
-> ((ColorIntensity, ColorIntensity) -> Int)
-> ((ColorIntensity, ColorIntensity) -> Int)
-> Ix ColorIntensity
(ColorIntensity, ColorIntensity) -> Int
(ColorIntensity, ColorIntensity) -> [ColorIntensity]
(ColorIntensity, ColorIntensity) -> ColorIntensity -> Bool
(ColorIntensity, ColorIntensity) -> ColorIntensity -> Int
forall a.
Ord a
-> ((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
unsafeRangeSize :: (ColorIntensity, ColorIntensity) -> Int
$cunsafeRangeSize :: (ColorIntensity, ColorIntensity) -> Int
rangeSize :: (ColorIntensity, ColorIntensity) -> Int
$crangeSize :: (ColorIntensity, ColorIntensity) -> Int
inRange :: (ColorIntensity, ColorIntensity) -> ColorIntensity -> Bool
$cinRange :: (ColorIntensity, ColorIntensity) -> ColorIntensity -> Bool
unsafeIndex :: (ColorIntensity, ColorIntensity) -> ColorIntensity -> Int
$cunsafeIndex :: (ColorIntensity, ColorIntensity) -> ColorIntensity -> Int
index :: (ColorIntensity, ColorIntensity) -> ColorIntensity -> Int
$cindex :: (ColorIntensity, ColorIntensity) -> ColorIntensity -> Int
range :: (ColorIntensity, ColorIntensity) -> [ColorIntensity]
$crange :: (ColorIntensity, ColorIntensity) -> [ColorIntensity]
$cp1Ix :: Ord ColorIntensity
Ix)
data ConsoleLayer = Foreground
| Background
deriving (ConsoleLayer -> ConsoleLayer -> Bool
(ConsoleLayer -> ConsoleLayer -> Bool)
-> (ConsoleLayer -> ConsoleLayer -> Bool) -> Eq ConsoleLayer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConsoleLayer -> ConsoleLayer -> Bool
$c/= :: ConsoleLayer -> ConsoleLayer -> Bool
== :: ConsoleLayer -> ConsoleLayer -> Bool
$c== :: ConsoleLayer -> ConsoleLayer -> Bool
Eq, Eq ConsoleLayer
Eq ConsoleLayer
-> (ConsoleLayer -> ConsoleLayer -> Ordering)
-> (ConsoleLayer -> ConsoleLayer -> Bool)
-> (ConsoleLayer -> ConsoleLayer -> Bool)
-> (ConsoleLayer -> ConsoleLayer -> Bool)
-> (ConsoleLayer -> ConsoleLayer -> Bool)
-> (ConsoleLayer -> ConsoleLayer -> ConsoleLayer)
-> (ConsoleLayer -> ConsoleLayer -> ConsoleLayer)
-> Ord ConsoleLayer
ConsoleLayer -> ConsoleLayer -> Bool
ConsoleLayer -> ConsoleLayer -> Ordering
ConsoleLayer -> ConsoleLayer -> ConsoleLayer
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer
$cmin :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer
max :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer
$cmax :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer
>= :: ConsoleLayer -> ConsoleLayer -> Bool
$c>= :: ConsoleLayer -> ConsoleLayer -> Bool
> :: ConsoleLayer -> ConsoleLayer -> Bool
$c> :: ConsoleLayer -> ConsoleLayer -> Bool
<= :: ConsoleLayer -> ConsoleLayer -> Bool
$c<= :: ConsoleLayer -> ConsoleLayer -> Bool
< :: ConsoleLayer -> ConsoleLayer -> Bool
$c< :: ConsoleLayer -> ConsoleLayer -> Bool
compare :: ConsoleLayer -> ConsoleLayer -> Ordering
$ccompare :: ConsoleLayer -> ConsoleLayer -> Ordering
$cp1Ord :: Eq ConsoleLayer
Ord, ConsoleLayer
ConsoleLayer -> ConsoleLayer -> Bounded ConsoleLayer
forall a. a -> a -> Bounded a
maxBound :: ConsoleLayer
$cmaxBound :: ConsoleLayer
minBound :: ConsoleLayer
$cminBound :: ConsoleLayer
Bounded, Int -> ConsoleLayer
ConsoleLayer -> Int
ConsoleLayer -> [ConsoleLayer]
ConsoleLayer -> ConsoleLayer
ConsoleLayer -> ConsoleLayer -> [ConsoleLayer]
ConsoleLayer -> ConsoleLayer -> ConsoleLayer -> [ConsoleLayer]
(ConsoleLayer -> ConsoleLayer)
-> (ConsoleLayer -> ConsoleLayer)
-> (Int -> ConsoleLayer)
-> (ConsoleLayer -> Int)
-> (ConsoleLayer -> [ConsoleLayer])
-> (ConsoleLayer -> ConsoleLayer -> [ConsoleLayer])
-> (ConsoleLayer -> ConsoleLayer -> [ConsoleLayer])
-> (ConsoleLayer -> ConsoleLayer -> ConsoleLayer -> [ConsoleLayer])
-> Enum ConsoleLayer
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer -> [ConsoleLayer]
$cenumFromThenTo :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer -> [ConsoleLayer]
enumFromTo :: ConsoleLayer -> ConsoleLayer -> [ConsoleLayer]
$cenumFromTo :: ConsoleLayer -> ConsoleLayer -> [ConsoleLayer]
enumFromThen :: ConsoleLayer -> ConsoleLayer -> [ConsoleLayer]
$cenumFromThen :: ConsoleLayer -> ConsoleLayer -> [ConsoleLayer]
enumFrom :: ConsoleLayer -> [ConsoleLayer]
$cenumFrom :: ConsoleLayer -> [ConsoleLayer]
fromEnum :: ConsoleLayer -> Int
$cfromEnum :: ConsoleLayer -> Int
toEnum :: Int -> ConsoleLayer
$ctoEnum :: Int -> ConsoleLayer
pred :: ConsoleLayer -> ConsoleLayer
$cpred :: ConsoleLayer -> ConsoleLayer
succ :: ConsoleLayer -> ConsoleLayer
$csucc :: ConsoleLayer -> ConsoleLayer
Enum, Int -> ConsoleLayer -> ShowS
[ConsoleLayer] -> ShowS
ConsoleLayer -> String
(Int -> ConsoleLayer -> ShowS)
-> (ConsoleLayer -> String)
-> ([ConsoleLayer] -> ShowS)
-> Show ConsoleLayer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConsoleLayer] -> ShowS
$cshowList :: [ConsoleLayer] -> ShowS
show :: ConsoleLayer -> String
$cshow :: ConsoleLayer -> String
showsPrec :: Int -> ConsoleLayer -> ShowS
$cshowsPrec :: Int -> ConsoleLayer -> ShowS
Show, ReadPrec [ConsoleLayer]
ReadPrec ConsoleLayer
Int -> ReadS ConsoleLayer
ReadS [ConsoleLayer]
(Int -> ReadS ConsoleLayer)
-> ReadS [ConsoleLayer]
-> ReadPrec ConsoleLayer
-> ReadPrec [ConsoleLayer]
-> Read ConsoleLayer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConsoleLayer]
$creadListPrec :: ReadPrec [ConsoleLayer]
readPrec :: ReadPrec ConsoleLayer
$creadPrec :: ReadPrec ConsoleLayer
readList :: ReadS [ConsoleLayer]
$creadList :: ReadS [ConsoleLayer]
readsPrec :: Int -> ReadS ConsoleLayer
$creadsPrec :: Int -> ReadS ConsoleLayer
Read, Ord ConsoleLayer
Ord ConsoleLayer
-> ((ConsoleLayer, ConsoleLayer) -> [ConsoleLayer])
-> ((ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Int)
-> ((ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Int)
-> ((ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Bool)
-> ((ConsoleLayer, ConsoleLayer) -> Int)
-> ((ConsoleLayer, ConsoleLayer) -> Int)
-> Ix ConsoleLayer
(ConsoleLayer, ConsoleLayer) -> Int
(ConsoleLayer, ConsoleLayer) -> [ConsoleLayer]
(ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Bool
(ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Int
forall a.
Ord a
-> ((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
unsafeRangeSize :: (ConsoleLayer, ConsoleLayer) -> Int
$cunsafeRangeSize :: (ConsoleLayer, ConsoleLayer) -> Int
rangeSize :: (ConsoleLayer, ConsoleLayer) -> Int
$crangeSize :: (ConsoleLayer, ConsoleLayer) -> Int
inRange :: (ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Bool
$cinRange :: (ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Bool
unsafeIndex :: (ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Int
$cunsafeIndex :: (ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Int
index :: (ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Int
$cindex :: (ConsoleLayer, ConsoleLayer) -> ConsoleLayer -> Int
range :: (ConsoleLayer, ConsoleLayer) -> [ConsoleLayer]
$crange :: (ConsoleLayer, ConsoleLayer) -> [ConsoleLayer]
$cp1Ix :: Ord ConsoleLayer
Ix)
data BlinkSpeed = SlowBlink
| RapidBlink
| NoBlink
deriving (BlinkSpeed -> BlinkSpeed -> Bool
(BlinkSpeed -> BlinkSpeed -> Bool)
-> (BlinkSpeed -> BlinkSpeed -> Bool) -> Eq BlinkSpeed
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlinkSpeed -> BlinkSpeed -> Bool
$c/= :: BlinkSpeed -> BlinkSpeed -> Bool
== :: BlinkSpeed -> BlinkSpeed -> Bool
$c== :: BlinkSpeed -> BlinkSpeed -> Bool
Eq, Eq BlinkSpeed
Eq BlinkSpeed
-> (BlinkSpeed -> BlinkSpeed -> Ordering)
-> (BlinkSpeed -> BlinkSpeed -> Bool)
-> (BlinkSpeed -> BlinkSpeed -> Bool)
-> (BlinkSpeed -> BlinkSpeed -> Bool)
-> (BlinkSpeed -> BlinkSpeed -> Bool)
-> (BlinkSpeed -> BlinkSpeed -> BlinkSpeed)
-> (BlinkSpeed -> BlinkSpeed -> BlinkSpeed)
-> Ord BlinkSpeed
BlinkSpeed -> BlinkSpeed -> Bool
BlinkSpeed -> BlinkSpeed -> Ordering
BlinkSpeed -> BlinkSpeed -> BlinkSpeed
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: BlinkSpeed -> BlinkSpeed -> BlinkSpeed
$cmin :: BlinkSpeed -> BlinkSpeed -> BlinkSpeed
max :: BlinkSpeed -> BlinkSpeed -> BlinkSpeed
$cmax :: BlinkSpeed -> BlinkSpeed -> BlinkSpeed
>= :: BlinkSpeed -> BlinkSpeed -> Bool
$c>= :: BlinkSpeed -> BlinkSpeed -> Bool
> :: BlinkSpeed -> BlinkSpeed -> Bool
$c> :: BlinkSpeed -> BlinkSpeed -> Bool
<= :: BlinkSpeed -> BlinkSpeed -> Bool
$c<= :: BlinkSpeed -> BlinkSpeed -> Bool
< :: BlinkSpeed -> BlinkSpeed -> Bool
$c< :: BlinkSpeed -> BlinkSpeed -> Bool
compare :: BlinkSpeed -> BlinkSpeed -> Ordering
$ccompare :: BlinkSpeed -> BlinkSpeed -> Ordering
$cp1Ord :: Eq BlinkSpeed
Ord, BlinkSpeed
BlinkSpeed -> BlinkSpeed -> Bounded BlinkSpeed
forall a. a -> a -> Bounded a
maxBound :: BlinkSpeed
$cmaxBound :: BlinkSpeed
minBound :: BlinkSpeed
$cminBound :: BlinkSpeed
Bounded, Int -> BlinkSpeed
BlinkSpeed -> Int
BlinkSpeed -> [BlinkSpeed]
BlinkSpeed -> BlinkSpeed
BlinkSpeed -> BlinkSpeed -> [BlinkSpeed]
BlinkSpeed -> BlinkSpeed -> BlinkSpeed -> [BlinkSpeed]
(BlinkSpeed -> BlinkSpeed)
-> (BlinkSpeed -> BlinkSpeed)
-> (Int -> BlinkSpeed)
-> (BlinkSpeed -> Int)
-> (BlinkSpeed -> [BlinkSpeed])
-> (BlinkSpeed -> BlinkSpeed -> [BlinkSpeed])
-> (BlinkSpeed -> BlinkSpeed -> [BlinkSpeed])
-> (BlinkSpeed -> BlinkSpeed -> BlinkSpeed -> [BlinkSpeed])
-> Enum BlinkSpeed
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: BlinkSpeed -> BlinkSpeed -> BlinkSpeed -> [BlinkSpeed]
$cenumFromThenTo :: BlinkSpeed -> BlinkSpeed -> BlinkSpeed -> [BlinkSpeed]
enumFromTo :: BlinkSpeed -> BlinkSpeed -> [BlinkSpeed]
$cenumFromTo :: BlinkSpeed -> BlinkSpeed -> [BlinkSpeed]
enumFromThen :: BlinkSpeed -> BlinkSpeed -> [BlinkSpeed]
$cenumFromThen :: BlinkSpeed -> BlinkSpeed -> [BlinkSpeed]
enumFrom :: BlinkSpeed -> [BlinkSpeed]
$cenumFrom :: BlinkSpeed -> [BlinkSpeed]
fromEnum :: BlinkSpeed -> Int
$cfromEnum :: BlinkSpeed -> Int
toEnum :: Int -> BlinkSpeed
$ctoEnum :: Int -> BlinkSpeed
pred :: BlinkSpeed -> BlinkSpeed
$cpred :: BlinkSpeed -> BlinkSpeed
succ :: BlinkSpeed -> BlinkSpeed
$csucc :: BlinkSpeed -> BlinkSpeed
Enum, Int -> BlinkSpeed -> ShowS
[BlinkSpeed] -> ShowS
BlinkSpeed -> String
(Int -> BlinkSpeed -> ShowS)
-> (BlinkSpeed -> String)
-> ([BlinkSpeed] -> ShowS)
-> Show BlinkSpeed
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BlinkSpeed] -> ShowS
$cshowList :: [BlinkSpeed] -> ShowS
show :: BlinkSpeed -> String
$cshow :: BlinkSpeed -> String
showsPrec :: Int -> BlinkSpeed -> ShowS
$cshowsPrec :: Int -> BlinkSpeed -> ShowS
Show, ReadPrec [BlinkSpeed]
ReadPrec BlinkSpeed
Int -> ReadS BlinkSpeed
ReadS [BlinkSpeed]
(Int -> ReadS BlinkSpeed)
-> ReadS [BlinkSpeed]
-> ReadPrec BlinkSpeed
-> ReadPrec [BlinkSpeed]
-> Read BlinkSpeed
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BlinkSpeed]
$creadListPrec :: ReadPrec [BlinkSpeed]
readPrec :: ReadPrec BlinkSpeed
$creadPrec :: ReadPrec BlinkSpeed
readList :: ReadS [BlinkSpeed]
$creadList :: ReadS [BlinkSpeed]
readsPrec :: Int -> ReadS BlinkSpeed
$creadsPrec :: Int -> ReadS BlinkSpeed
Read, Ord BlinkSpeed
Ord BlinkSpeed
-> ((BlinkSpeed, BlinkSpeed) -> [BlinkSpeed])
-> ((BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Int)
-> ((BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Int)
-> ((BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Bool)
-> ((BlinkSpeed, BlinkSpeed) -> Int)
-> ((BlinkSpeed, BlinkSpeed) -> Int)
-> Ix BlinkSpeed
(BlinkSpeed, BlinkSpeed) -> Int
(BlinkSpeed, BlinkSpeed) -> [BlinkSpeed]
(BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Bool
(BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Int
forall a.
Ord a
-> ((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
unsafeRangeSize :: (BlinkSpeed, BlinkSpeed) -> Int
$cunsafeRangeSize :: (BlinkSpeed, BlinkSpeed) -> Int
rangeSize :: (BlinkSpeed, BlinkSpeed) -> Int
$crangeSize :: (BlinkSpeed, BlinkSpeed) -> Int
inRange :: (BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Bool
$cinRange :: (BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Bool
unsafeIndex :: (BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Int
$cunsafeIndex :: (BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Int
index :: (BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Int
$cindex :: (BlinkSpeed, BlinkSpeed) -> BlinkSpeed -> Int
range :: (BlinkSpeed, BlinkSpeed) -> [BlinkSpeed]
$crange :: (BlinkSpeed, BlinkSpeed) -> [BlinkSpeed]
$cp1Ix :: Ord BlinkSpeed
Ix)
data Underlining
= SingleUnderline
| DoubleUnderline
| NoUnderline
deriving (Underlining -> Underlining -> Bool
(Underlining -> Underlining -> Bool)
-> (Underlining -> Underlining -> Bool) -> Eq Underlining
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Underlining -> Underlining -> Bool
$c/= :: Underlining -> Underlining -> Bool
== :: Underlining -> Underlining -> Bool
$c== :: Underlining -> Underlining -> Bool
Eq, Eq Underlining
Eq Underlining
-> (Underlining -> Underlining -> Ordering)
-> (Underlining -> Underlining -> Bool)
-> (Underlining -> Underlining -> Bool)
-> (Underlining -> Underlining -> Bool)
-> (Underlining -> Underlining -> Bool)
-> (Underlining -> Underlining -> Underlining)
-> (Underlining -> Underlining -> Underlining)
-> Ord Underlining
Underlining -> Underlining -> Bool
Underlining -> Underlining -> Ordering
Underlining -> Underlining -> Underlining
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Underlining -> Underlining -> Underlining
$cmin :: Underlining -> Underlining -> Underlining
max :: Underlining -> Underlining -> Underlining
$cmax :: Underlining -> Underlining -> Underlining
>= :: Underlining -> Underlining -> Bool
$c>= :: Underlining -> Underlining -> Bool
> :: Underlining -> Underlining -> Bool
$c> :: Underlining -> Underlining -> Bool
<= :: Underlining -> Underlining -> Bool
$c<= :: Underlining -> Underlining -> Bool
< :: Underlining -> Underlining -> Bool
$c< :: Underlining -> Underlining -> Bool
compare :: Underlining -> Underlining -> Ordering
$ccompare :: Underlining -> Underlining -> Ordering
$cp1Ord :: Eq Underlining
Ord, Underlining
Underlining -> Underlining -> Bounded Underlining
forall a. a -> a -> Bounded a
maxBound :: Underlining
$cmaxBound :: Underlining
minBound :: Underlining
$cminBound :: Underlining
Bounded ,Int -> Underlining
Underlining -> Int
Underlining -> [Underlining]
Underlining -> Underlining
Underlining -> Underlining -> [Underlining]
Underlining -> Underlining -> Underlining -> [Underlining]
(Underlining -> Underlining)
-> (Underlining -> Underlining)
-> (Int -> Underlining)
-> (Underlining -> Int)
-> (Underlining -> [Underlining])
-> (Underlining -> Underlining -> [Underlining])
-> (Underlining -> Underlining -> [Underlining])
-> (Underlining -> Underlining -> Underlining -> [Underlining])
-> Enum Underlining
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Underlining -> Underlining -> Underlining -> [Underlining]
$cenumFromThenTo :: Underlining -> Underlining -> Underlining -> [Underlining]
enumFromTo :: Underlining -> Underlining -> [Underlining]
$cenumFromTo :: Underlining -> Underlining -> [Underlining]
enumFromThen :: Underlining -> Underlining -> [Underlining]
$cenumFromThen :: Underlining -> Underlining -> [Underlining]
enumFrom :: Underlining -> [Underlining]
$cenumFrom :: Underlining -> [Underlining]
fromEnum :: Underlining -> Int
$cfromEnum :: Underlining -> Int
toEnum :: Int -> Underlining
$ctoEnum :: Int -> Underlining
pred :: Underlining -> Underlining
$cpred :: Underlining -> Underlining
succ :: Underlining -> Underlining
$csucc :: Underlining -> Underlining
Enum, Int -> Underlining -> ShowS
[Underlining] -> ShowS
Underlining -> String
(Int -> Underlining -> ShowS)
-> (Underlining -> String)
-> ([Underlining] -> ShowS)
-> Show Underlining
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Underlining] -> ShowS
$cshowList :: [Underlining] -> ShowS
show :: Underlining -> String
$cshow :: Underlining -> String
showsPrec :: Int -> Underlining -> ShowS
$cshowsPrec :: Int -> Underlining -> ShowS
Show, ReadPrec [Underlining]
ReadPrec Underlining
Int -> ReadS Underlining
ReadS [Underlining]
(Int -> ReadS Underlining)
-> ReadS [Underlining]
-> ReadPrec Underlining
-> ReadPrec [Underlining]
-> Read Underlining
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Underlining]
$creadListPrec :: ReadPrec [Underlining]
readPrec :: ReadPrec Underlining
$creadPrec :: ReadPrec Underlining
readList :: ReadS [Underlining]
$creadList :: ReadS [Underlining]
readsPrec :: Int -> ReadS Underlining
$creadsPrec :: Int -> ReadS Underlining
Read, Ord Underlining
Ord Underlining
-> ((Underlining, Underlining) -> [Underlining])
-> ((Underlining, Underlining) -> Underlining -> Int)
-> ((Underlining, Underlining) -> Underlining -> Int)
-> ((Underlining, Underlining) -> Underlining -> Bool)
-> ((Underlining, Underlining) -> Int)
-> ((Underlining, Underlining) -> Int)
-> Ix Underlining
(Underlining, Underlining) -> Int
(Underlining, Underlining) -> [Underlining]
(Underlining, Underlining) -> Underlining -> Bool
(Underlining, Underlining) -> Underlining -> Int
forall a.
Ord a
-> ((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
unsafeRangeSize :: (Underlining, Underlining) -> Int
$cunsafeRangeSize :: (Underlining, Underlining) -> Int
rangeSize :: (Underlining, Underlining) -> Int
$crangeSize :: (Underlining, Underlining) -> Int
inRange :: (Underlining, Underlining) -> Underlining -> Bool
$cinRange :: (Underlining, Underlining) -> Underlining -> Bool
unsafeIndex :: (Underlining, Underlining) -> Underlining -> Int
$cunsafeIndex :: (Underlining, Underlining) -> Underlining -> Int
index :: (Underlining, Underlining) -> Underlining -> Int
$cindex :: (Underlining, Underlining) -> Underlining -> Int
range :: (Underlining, Underlining) -> [Underlining]
$crange :: (Underlining, Underlining) -> [Underlining]
$cp1Ix :: Ord Underlining
Ix)
data ConsoleIntensity
= BoldIntensity
| FaintIntensity
| NormalIntensity
deriving (ConsoleIntensity -> ConsoleIntensity -> Bool
(ConsoleIntensity -> ConsoleIntensity -> Bool)
-> (ConsoleIntensity -> ConsoleIntensity -> Bool)
-> Eq ConsoleIntensity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConsoleIntensity -> ConsoleIntensity -> Bool
$c/= :: ConsoleIntensity -> ConsoleIntensity -> Bool
== :: ConsoleIntensity -> ConsoleIntensity -> Bool
$c== :: ConsoleIntensity -> ConsoleIntensity -> Bool
Eq, Eq ConsoleIntensity
Eq ConsoleIntensity
-> (ConsoleIntensity -> ConsoleIntensity -> Ordering)
-> (ConsoleIntensity -> ConsoleIntensity -> Bool)
-> (ConsoleIntensity -> ConsoleIntensity -> Bool)
-> (ConsoleIntensity -> ConsoleIntensity -> Bool)
-> (ConsoleIntensity -> ConsoleIntensity -> Bool)
-> (ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity)
-> (ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity)
-> Ord ConsoleIntensity
ConsoleIntensity -> ConsoleIntensity -> Bool
ConsoleIntensity -> ConsoleIntensity -> Ordering
ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity
$cmin :: ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity
max :: ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity
$cmax :: ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity
>= :: ConsoleIntensity -> ConsoleIntensity -> Bool
$c>= :: ConsoleIntensity -> ConsoleIntensity -> Bool
> :: ConsoleIntensity -> ConsoleIntensity -> Bool
$c> :: ConsoleIntensity -> ConsoleIntensity -> Bool
<= :: ConsoleIntensity -> ConsoleIntensity -> Bool
$c<= :: ConsoleIntensity -> ConsoleIntensity -> Bool
< :: ConsoleIntensity -> ConsoleIntensity -> Bool
$c< :: ConsoleIntensity -> ConsoleIntensity -> Bool
compare :: ConsoleIntensity -> ConsoleIntensity -> Ordering
$ccompare :: ConsoleIntensity -> ConsoleIntensity -> Ordering
$cp1Ord :: Eq ConsoleIntensity
Ord, ConsoleIntensity
ConsoleIntensity -> ConsoleIntensity -> Bounded ConsoleIntensity
forall a. a -> a -> Bounded a
maxBound :: ConsoleIntensity
$cmaxBound :: ConsoleIntensity
minBound :: ConsoleIntensity
$cminBound :: ConsoleIntensity
Bounded, Int -> ConsoleIntensity
ConsoleIntensity -> Int
ConsoleIntensity -> [ConsoleIntensity]
ConsoleIntensity -> ConsoleIntensity
ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity]
ConsoleIntensity
-> ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity]
(ConsoleIntensity -> ConsoleIntensity)
-> (ConsoleIntensity -> ConsoleIntensity)
-> (Int -> ConsoleIntensity)
-> (ConsoleIntensity -> Int)
-> (ConsoleIntensity -> [ConsoleIntensity])
-> (ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity])
-> (ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity])
-> (ConsoleIntensity
-> ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity])
-> Enum ConsoleIntensity
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: ConsoleIntensity
-> ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity]
$cenumFromThenTo :: ConsoleIntensity
-> ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity]
enumFromTo :: ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity]
$cenumFromTo :: ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity]
enumFromThen :: ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity]
$cenumFromThen :: ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity]
enumFrom :: ConsoleIntensity -> [ConsoleIntensity]
$cenumFrom :: ConsoleIntensity -> [ConsoleIntensity]
fromEnum :: ConsoleIntensity -> Int
$cfromEnum :: ConsoleIntensity -> Int
toEnum :: Int -> ConsoleIntensity
$ctoEnum :: Int -> ConsoleIntensity
pred :: ConsoleIntensity -> ConsoleIntensity
$cpred :: ConsoleIntensity -> ConsoleIntensity
succ :: ConsoleIntensity -> ConsoleIntensity
$csucc :: ConsoleIntensity -> ConsoleIntensity
Enum, Int -> ConsoleIntensity -> ShowS
[ConsoleIntensity] -> ShowS
ConsoleIntensity -> String
(Int -> ConsoleIntensity -> ShowS)
-> (ConsoleIntensity -> String)
-> ([ConsoleIntensity] -> ShowS)
-> Show ConsoleIntensity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConsoleIntensity] -> ShowS
$cshowList :: [ConsoleIntensity] -> ShowS
show :: ConsoleIntensity -> String
$cshow :: ConsoleIntensity -> String
showsPrec :: Int -> ConsoleIntensity -> ShowS
$cshowsPrec :: Int -> ConsoleIntensity -> ShowS
Show, ReadPrec [ConsoleIntensity]
ReadPrec ConsoleIntensity
Int -> ReadS ConsoleIntensity
ReadS [ConsoleIntensity]
(Int -> ReadS ConsoleIntensity)
-> ReadS [ConsoleIntensity]
-> ReadPrec ConsoleIntensity
-> ReadPrec [ConsoleIntensity]
-> Read ConsoleIntensity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConsoleIntensity]
$creadListPrec :: ReadPrec [ConsoleIntensity]
readPrec :: ReadPrec ConsoleIntensity
$creadPrec :: ReadPrec ConsoleIntensity
readList :: ReadS [ConsoleIntensity]
$creadList :: ReadS [ConsoleIntensity]
readsPrec :: Int -> ReadS ConsoleIntensity
$creadsPrec :: Int -> ReadS ConsoleIntensity
Read, Ord ConsoleIntensity
Ord ConsoleIntensity
-> ((ConsoleIntensity, ConsoleIntensity) -> [ConsoleIntensity])
-> ((ConsoleIntensity, ConsoleIntensity)
-> ConsoleIntensity -> Int)
-> ((ConsoleIntensity, ConsoleIntensity)
-> ConsoleIntensity -> Int)
-> ((ConsoleIntensity, ConsoleIntensity)
-> ConsoleIntensity -> Bool)
-> ((ConsoleIntensity, ConsoleIntensity) -> Int)
-> ((ConsoleIntensity, ConsoleIntensity) -> Int)
-> Ix ConsoleIntensity
(ConsoleIntensity, ConsoleIntensity) -> Int
(ConsoleIntensity, ConsoleIntensity) -> [ConsoleIntensity]
(ConsoleIntensity, ConsoleIntensity) -> ConsoleIntensity -> Bool
(ConsoleIntensity, ConsoleIntensity) -> ConsoleIntensity -> Int
forall a.
Ord a
-> ((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
unsafeRangeSize :: (ConsoleIntensity, ConsoleIntensity) -> Int
$cunsafeRangeSize :: (ConsoleIntensity, ConsoleIntensity) -> Int
rangeSize :: (ConsoleIntensity, ConsoleIntensity) -> Int
$crangeSize :: (ConsoleIntensity, ConsoleIntensity) -> Int
inRange :: (ConsoleIntensity, ConsoleIntensity) -> ConsoleIntensity -> Bool
$cinRange :: (ConsoleIntensity, ConsoleIntensity) -> ConsoleIntensity -> Bool
unsafeIndex :: (ConsoleIntensity, ConsoleIntensity) -> ConsoleIntensity -> Int
$cunsafeIndex :: (ConsoleIntensity, ConsoleIntensity) -> ConsoleIntensity -> Int
index :: (ConsoleIntensity, ConsoleIntensity) -> ConsoleIntensity -> Int
$cindex :: (ConsoleIntensity, ConsoleIntensity) -> ConsoleIntensity -> Int
range :: (ConsoleIntensity, ConsoleIntensity) -> [ConsoleIntensity]
$crange :: (ConsoleIntensity, ConsoleIntensity) -> [ConsoleIntensity]
$cp1Ix :: Ord ConsoleIntensity
Ix)
data SGR
= Reset
| SetConsoleIntensity !ConsoleIntensity
| SetItalicized !Bool
| SetUnderlining !Underlining
| SetBlinkSpeed !BlinkSpeed
| SetVisible !Bool
| SetSwapForegroundBackground !Bool
| SetColor !ConsoleLayer !ColorIntensity !Color
| SetRGBColor !ConsoleLayer !(Colour Float)
| SetPaletteColor !ConsoleLayer !Word8
| SetDefaultColor !ConsoleLayer
deriving (SGR -> SGR -> Bool
(SGR -> SGR -> Bool) -> (SGR -> SGR -> Bool) -> Eq SGR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SGR -> SGR -> Bool
$c/= :: SGR -> SGR -> Bool
== :: SGR -> SGR -> Bool
$c== :: SGR -> SGR -> Bool
Eq, Int -> SGR -> ShowS
[SGR] -> ShowS
SGR -> String
(Int -> SGR -> ShowS)
-> (SGR -> String) -> ([SGR] -> ShowS) -> Show SGR
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SGR] -> ShowS
$cshowList :: [SGR] -> ShowS
show :: SGR -> String
$cshow :: SGR -> String
showsPrec :: Int -> SGR -> ShowS
$cshowsPrec :: Int -> SGR -> ShowS
Show, ReadPrec [SGR]
ReadPrec SGR
Int -> ReadS SGR
ReadS [SGR]
(Int -> ReadS SGR)
-> ReadS [SGR] -> ReadPrec SGR -> ReadPrec [SGR] -> Read SGR
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SGR]
$creadListPrec :: ReadPrec [SGR]
readPrec :: ReadPrec SGR
$creadPrec :: ReadPrec SGR
readList :: ReadS [SGR]
$creadList :: ReadS [SGR]
readsPrec :: Int -> ReadS SGR
$creadsPrec :: Int -> ReadS SGR
Read)
xterm6LevelRGB :: Int -> Int -> Int -> Word8
xterm6LevelRGB :: Int -> Int -> Int -> Word8
xterm6LevelRGB Int
r Int
g Int
b
| Int
r Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= Int
0 Bool -> Bool -> Bool
&& Int
r Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< Int
6 Bool -> Bool -> Bool
&& Int
g Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= Int
0 Bool -> Bool -> Bool
&& Int
g Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< Int
6 Bool -> Bool -> Bool
&& Int
b Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= Int
0 Bool -> Bool -> Bool
&& Int
b Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< Int
6
= Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word8) -> Int -> Word8
forall a b. (a -> b) -> a -> b
$ Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
36 Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
r Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
6 Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
g Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
b
| Bool
otherwise
= String -> Word8
forall a. HasCallStack => String -> a
error (String -> Word8) -> String -> Word8
forall a b. (a -> b) -> a -> b
$ Int -> String
forall a. Show a => a -> String
show Int
r String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
" " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
g String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
" " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
b String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
" (r g b) is " String -> ShowS
forall a. [a] -> [a] -> [a]
++
String
"outside of a 6 level (6x6x6) color cube."
xterm24LevelGray :: Int -> Word8
xterm24LevelGray :: Int -> Word8
xterm24LevelGray Int
y
| Int
y Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= Int
0 Bool -> Bool -> Bool
&& Int
y Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< Int
24 = Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word8) -> Int -> Word8
forall a b. (a -> b) -> a -> b
$ Int
232 Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
y
| Bool
otherwise
= String -> Word8
forall a. HasCallStack => String -> a
error (String -> Word8) -> String -> Word8
forall a b. (a -> b) -> a -> b
$ Int -> String
forall a. Show a => a -> String
show Int
y String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
" (gray) is outside of the range 0 to 23."
xtermSystem :: ColorIntensity -> Color -> Word8
xtermSystem :: ColorIntensity -> Color -> Word8
xtermSystem ColorIntensity
intensity Color
color
| ColorIntensity
intensity ColorIntensity -> ColorIntensity -> Bool
forall a. Eq a => a -> a -> Bool
== ColorIntensity
Dull = Word8
index
| Bool
otherwise = Word8
index Word8 -> Word8 -> Word8
forall a. Num a => a -> a -> a
+ Word8
8
where
index :: Word8
index = Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word8) -> Int -> Word8
forall a b. (a -> b) -> a -> b
$ Color -> Int
forall a. Enum a => a -> Int
fromEnum Color
color