module Language.Docker.Syntax.Protocol where


import Prettyprinter


data Protocol
  = TCP
  | UDP
  deriving (Int -> Protocol -> ShowS
[Protocol] -> ShowS
Protocol -> String
(Int -> Protocol -> ShowS)
-> (Protocol -> String) -> ([Protocol] -> ShowS) -> Show Protocol
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Protocol -> ShowS
showsPrec :: Int -> Protocol -> ShowS
$cshow :: Protocol -> String
show :: Protocol -> String
$cshowList :: [Protocol] -> ShowS
showList :: [Protocol] -> ShowS
Show, Protocol -> Protocol -> Bool
(Protocol -> Protocol -> Bool)
-> (Protocol -> Protocol -> Bool) -> Eq Protocol
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Protocol -> Protocol -> Bool
== :: Protocol -> Protocol -> Bool
$c/= :: Protocol -> Protocol -> Bool
/= :: Protocol -> Protocol -> Bool
Eq, Eq Protocol
Eq Protocol =>
(Protocol -> Protocol -> Ordering)
-> (Protocol -> Protocol -> Bool)
-> (Protocol -> Protocol -> Bool)
-> (Protocol -> Protocol -> Bool)
-> (Protocol -> Protocol -> Bool)
-> (Protocol -> Protocol -> Protocol)
-> (Protocol -> Protocol -> Protocol)
-> Ord Protocol
Protocol -> Protocol -> Bool
Protocol -> Protocol -> Ordering
Protocol -> Protocol -> Protocol
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
$ccompare :: Protocol -> Protocol -> Ordering
compare :: Protocol -> Protocol -> Ordering
$c< :: Protocol -> Protocol -> Bool
< :: Protocol -> Protocol -> Bool
$c<= :: Protocol -> Protocol -> Bool
<= :: Protocol -> Protocol -> Bool
$c> :: Protocol -> Protocol -> Bool
> :: Protocol -> Protocol -> Bool
$c>= :: Protocol -> Protocol -> Bool
>= :: Protocol -> Protocol -> Bool
$cmax :: Protocol -> Protocol -> Protocol
max :: Protocol -> Protocol -> Protocol
$cmin :: Protocol -> Protocol -> Protocol
min :: Protocol -> Protocol -> Protocol
Ord)


instance Pretty Protocol where
  pretty :: forall ann. Protocol -> Doc ann
pretty Protocol
TCP = Doc ann
""
  pretty Protocol
UDP = Doc ann
"/udp"