{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Text.Colour.Capabilities where

import GHC.Generics (Generic)

-- Note that the order of these constructors matters!
data TerminalCapabilities
  = -- | No colours
    WithoutColours
  | -- | Only 8 colours
    With8Colours
  | -- | Only 8-bit colours
    With8BitColours
  | -- | All 24-bit colours
    With24BitColours
  deriving (Int -> TerminalCapabilities -> ShowS
[TerminalCapabilities] -> ShowS
TerminalCapabilities -> String
(Int -> TerminalCapabilities -> ShowS)
-> (TerminalCapabilities -> String)
-> ([TerminalCapabilities] -> ShowS)
-> Show TerminalCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TerminalCapabilities] -> ShowS
$cshowList :: [TerminalCapabilities] -> ShowS
show :: TerminalCapabilities -> String
$cshow :: TerminalCapabilities -> String
showsPrec :: Int -> TerminalCapabilities -> ShowS
$cshowsPrec :: Int -> TerminalCapabilities -> ShowS
Show, TerminalCapabilities -> TerminalCapabilities -> Bool
(TerminalCapabilities -> TerminalCapabilities -> Bool)
-> (TerminalCapabilities -> TerminalCapabilities -> Bool)
-> Eq TerminalCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TerminalCapabilities -> TerminalCapabilities -> Bool
$c/= :: TerminalCapabilities -> TerminalCapabilities -> Bool
== :: TerminalCapabilities -> TerminalCapabilities -> Bool
$c== :: TerminalCapabilities -> TerminalCapabilities -> Bool
Eq, Eq TerminalCapabilities
Eq TerminalCapabilities
-> (TerminalCapabilities -> TerminalCapabilities -> Ordering)
-> (TerminalCapabilities -> TerminalCapabilities -> Bool)
-> (TerminalCapabilities -> TerminalCapabilities -> Bool)
-> (TerminalCapabilities -> TerminalCapabilities -> Bool)
-> (TerminalCapabilities -> TerminalCapabilities -> Bool)
-> (TerminalCapabilities
    -> TerminalCapabilities -> TerminalCapabilities)
-> (TerminalCapabilities
    -> TerminalCapabilities -> TerminalCapabilities)
-> Ord TerminalCapabilities
TerminalCapabilities -> TerminalCapabilities -> Bool
TerminalCapabilities -> TerminalCapabilities -> Ordering
TerminalCapabilities
-> TerminalCapabilities -> TerminalCapabilities
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 :: TerminalCapabilities
-> TerminalCapabilities -> TerminalCapabilities
$cmin :: TerminalCapabilities
-> TerminalCapabilities -> TerminalCapabilities
max :: TerminalCapabilities
-> TerminalCapabilities -> TerminalCapabilities
$cmax :: TerminalCapabilities
-> TerminalCapabilities -> TerminalCapabilities
>= :: TerminalCapabilities -> TerminalCapabilities -> Bool
$c>= :: TerminalCapabilities -> TerminalCapabilities -> Bool
> :: TerminalCapabilities -> TerminalCapabilities -> Bool
$c> :: TerminalCapabilities -> TerminalCapabilities -> Bool
<= :: TerminalCapabilities -> TerminalCapabilities -> Bool
$c<= :: TerminalCapabilities -> TerminalCapabilities -> Bool
< :: TerminalCapabilities -> TerminalCapabilities -> Bool
$c< :: TerminalCapabilities -> TerminalCapabilities -> Bool
compare :: TerminalCapabilities -> TerminalCapabilities -> Ordering
$ccompare :: TerminalCapabilities -> TerminalCapabilities -> Ordering
$cp1Ord :: Eq TerminalCapabilities
Ord, (forall x. TerminalCapabilities -> Rep TerminalCapabilities x)
-> (forall x. Rep TerminalCapabilities x -> TerminalCapabilities)
-> Generic TerminalCapabilities
forall x. Rep TerminalCapabilities x -> TerminalCapabilities
forall x. TerminalCapabilities -> Rep TerminalCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TerminalCapabilities x -> TerminalCapabilities
$cfrom :: forall x. TerminalCapabilities -> Rep TerminalCapabilities x
Generic)