{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}

module Language.Docker.Syntax
  ( module Language.Docker.Syntax,
    module Language.Docker.Syntax.Port,
    module Language.Docker.Syntax.PortRange,
    module Language.Docker.Syntax.Protocol
  )
where

import Data.Default.Class (Default (..))
import Data.List (intercalate, isInfixOf)
import Data.List.NonEmpty (NonEmpty)
import Data.List.Split (endBy)
import Data.String (IsString (..))
import Data.Text (Text)
import Data.Set (Set)
import qualified Data.Text as Text
import Data.Time.Clock (DiffTime)
import GHC.Exts (IsList (..))
import Text.Printf


import Language.Docker.Syntax.Port
import Language.Docker.Syntax.PortRange
import Language.Docker.Syntax.Protocol


data Image
  = Image
      { Image -> Maybe Registry
registryName :: !(Maybe Registry),
        Image -> Text
imageName :: !Text
      }
  deriving (Int -> Image -> ShowS
[Image] -> ShowS
Image -> String
(Int -> Image -> ShowS)
-> (Image -> String) -> ([Image] -> ShowS) -> Show Image
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Image -> ShowS
showsPrec :: Int -> Image -> ShowS
$cshow :: Image -> String
show :: Image -> String
$cshowList :: [Image] -> ShowS
showList :: [Image] -> ShowS
Show, Image -> Image -> Bool
(Image -> Image -> Bool) -> (Image -> Image -> Bool) -> Eq Image
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Image -> Image -> Bool
== :: Image -> Image -> Bool
$c/= :: Image -> Image -> Bool
/= :: Image -> Image -> Bool
Eq, Eq Image
Eq Image =>
(Image -> Image -> Ordering)
-> (Image -> Image -> Bool)
-> (Image -> Image -> Bool)
-> (Image -> Image -> Bool)
-> (Image -> Image -> Bool)
-> (Image -> Image -> Image)
-> (Image -> Image -> Image)
-> Ord Image
Image -> Image -> Bool
Image -> Image -> Ordering
Image -> Image -> Image
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 :: Image -> Image -> Ordering
compare :: Image -> Image -> Ordering
$c< :: Image -> Image -> Bool
< :: Image -> Image -> Bool
$c<= :: Image -> Image -> Bool
<= :: Image -> Image -> Bool
$c> :: Image -> Image -> Bool
> :: Image -> Image -> Bool
$c>= :: Image -> Image -> Bool
>= :: Image -> Image -> Bool
$cmax :: Image -> Image -> Image
max :: Image -> Image -> Image
$cmin :: Image -> Image -> Image
min :: Image -> Image -> Image
Ord)

instance IsString Image where
  fromString :: String -> Image
fromString String
img =
    if String
"/" String -> String -> Bool
forall a. Eq a => [a] -> [a] -> Bool
`isInfixOf` String
img
      then
        let parts :: [String]
parts = String -> String -> [String]
forall a. Eq a => [a] -> [a] -> [[a]]
endBy String
"/" String
img
         in if String
"." String -> String -> Bool
forall a. Eq a => [a] -> [a] -> Bool
`isInfixOf` [String] -> String
forall a. HasCallStack => [a] -> a
head [String]
parts
              then
                Maybe Registry -> Text -> Image
Image
                  (Registry -> Maybe Registry
forall a. a -> Maybe a
Just (Text -> Registry
Registry (String -> Text
Text.pack ([String] -> String
forall a. HasCallStack => [a] -> a
head [String]
parts))))
                  (String -> Text
Text.pack (String -> Text) -> ([String] -> String) -> [String] -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> [String] -> String
forall a. [a] -> [[a]] -> [a]
intercalate String
"/" ([String] -> Text) -> [String] -> Text
forall a b. (a -> b) -> a -> b
$ [String] -> [String]
forall a. HasCallStack => [a] -> [a]
tail [String]
parts)
              else Maybe Registry -> Text -> Image
Image Maybe Registry
forall a. Maybe a
Nothing (String -> Text
Text.pack String
img)
      else Maybe Registry -> Text -> Image
Image Maybe Registry
forall a. Maybe a
Nothing (String -> Text
Text.pack String
img)

newtype Registry
  = Registry
      { Registry -> Text
unRegistry :: Text
      }
  deriving (Int -> Registry -> ShowS
[Registry] -> ShowS
Registry -> String
(Int -> Registry -> ShowS)
-> (Registry -> String) -> ([Registry] -> ShowS) -> Show Registry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Registry -> ShowS
showsPrec :: Int -> Registry -> ShowS
$cshow :: Registry -> String
show :: Registry -> String
$cshowList :: [Registry] -> ShowS
showList :: [Registry] -> ShowS
Show, Registry -> Registry -> Bool
(Registry -> Registry -> Bool)
-> (Registry -> Registry -> Bool) -> Eq Registry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Registry -> Registry -> Bool
== :: Registry -> Registry -> Bool
$c/= :: Registry -> Registry -> Bool
/= :: Registry -> Registry -> Bool
Eq, Eq Registry
Eq Registry =>
(Registry -> Registry -> Ordering)
-> (Registry -> Registry -> Bool)
-> (Registry -> Registry -> Bool)
-> (Registry -> Registry -> Bool)
-> (Registry -> Registry -> Bool)
-> (Registry -> Registry -> Registry)
-> (Registry -> Registry -> Registry)
-> Ord Registry
Registry -> Registry -> Bool
Registry -> Registry -> Ordering
Registry -> Registry -> Registry
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 :: Registry -> Registry -> Ordering
compare :: Registry -> Registry -> Ordering
$c< :: Registry -> Registry -> Bool
< :: Registry -> Registry -> Bool
$c<= :: Registry -> Registry -> Bool
<= :: Registry -> Registry -> Bool
$c> :: Registry -> Registry -> Bool
> :: Registry -> Registry -> Bool
$c>= :: Registry -> Registry -> Bool
>= :: Registry -> Registry -> Bool
$cmax :: Registry -> Registry -> Registry
max :: Registry -> Registry -> Registry
$cmin :: Registry -> Registry -> Registry
min :: Registry -> Registry -> Registry
Ord, String -> Registry
(String -> Registry) -> IsString Registry
forall a. (String -> a) -> IsString a
$cfromString :: String -> Registry
fromString :: String -> Registry
IsString)

newtype Tag
  = Tag
      { Tag -> Text
unTag :: Text
      }
  deriving (Int -> Tag -> ShowS
[Tag] -> ShowS
Tag -> String
(Int -> Tag -> ShowS)
-> (Tag -> String) -> ([Tag] -> ShowS) -> Show Tag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Tag -> ShowS
showsPrec :: Int -> Tag -> ShowS
$cshow :: Tag -> String
show :: Tag -> String
$cshowList :: [Tag] -> ShowS
showList :: [Tag] -> ShowS
Show, Tag -> Tag -> Bool
(Tag -> Tag -> Bool) -> (Tag -> Tag -> Bool) -> Eq Tag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Tag -> Tag -> Bool
== :: Tag -> Tag -> Bool
$c/= :: Tag -> Tag -> Bool
/= :: Tag -> Tag -> Bool
Eq, Eq Tag
Eq Tag =>
(Tag -> Tag -> Ordering)
-> (Tag -> Tag -> Bool)
-> (Tag -> Tag -> Bool)
-> (Tag -> Tag -> Bool)
-> (Tag -> Tag -> Bool)
-> (Tag -> Tag -> Tag)
-> (Tag -> Tag -> Tag)
-> Ord Tag
Tag -> Tag -> Bool
Tag -> Tag -> Ordering
Tag -> Tag -> Tag
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 :: Tag -> Tag -> Ordering
compare :: Tag -> Tag -> Ordering
$c< :: Tag -> Tag -> Bool
< :: Tag -> Tag -> Bool
$c<= :: Tag -> Tag -> Bool
<= :: Tag -> Tag -> Bool
$c> :: Tag -> Tag -> Bool
> :: Tag -> Tag -> Bool
$c>= :: Tag -> Tag -> Bool
>= :: Tag -> Tag -> Bool
$cmax :: Tag -> Tag -> Tag
max :: Tag -> Tag -> Tag
$cmin :: Tag -> Tag -> Tag
min :: Tag -> Tag -> Tag
Ord, String -> Tag
(String -> Tag) -> IsString Tag
forall a. (String -> a) -> IsString a
$cfromString :: String -> Tag
fromString :: String -> Tag
IsString)

newtype Digest
  = Digest
      { Digest -> Text
unDigest :: Text
      }
  deriving (Int -> Digest -> ShowS
[Digest] -> ShowS
Digest -> String
(Int -> Digest -> ShowS)
-> (Digest -> String) -> ([Digest] -> ShowS) -> Show Digest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Digest -> ShowS
showsPrec :: Int -> Digest -> ShowS
$cshow :: Digest -> String
show :: Digest -> String
$cshowList :: [Digest] -> ShowS
showList :: [Digest] -> ShowS
Show, Digest -> Digest -> Bool
(Digest -> Digest -> Bool)
-> (Digest -> Digest -> Bool) -> Eq Digest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Digest -> Digest -> Bool
== :: Digest -> Digest -> Bool
$c/= :: Digest -> Digest -> Bool
/= :: Digest -> Digest -> Bool
Eq, Eq Digest
Eq Digest =>
(Digest -> Digest -> Ordering)
-> (Digest -> Digest -> Bool)
-> (Digest -> Digest -> Bool)
-> (Digest -> Digest -> Bool)
-> (Digest -> Digest -> Bool)
-> (Digest -> Digest -> Digest)
-> (Digest -> Digest -> Digest)
-> Ord Digest
Digest -> Digest -> Bool
Digest -> Digest -> Ordering
Digest -> Digest -> Digest
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 :: Digest -> Digest -> Ordering
compare :: Digest -> Digest -> Ordering
$c< :: Digest -> Digest -> Bool
< :: Digest -> Digest -> Bool
$c<= :: Digest -> Digest -> Bool
<= :: Digest -> Digest -> Bool
$c> :: Digest -> Digest -> Bool
> :: Digest -> Digest -> Bool
$c>= :: Digest -> Digest -> Bool
>= :: Digest -> Digest -> Bool
$cmax :: Digest -> Digest -> Digest
max :: Digest -> Digest -> Digest
$cmin :: Digest -> Digest -> Digest
min :: Digest -> Digest -> Digest
Ord, String -> Digest
(String -> Digest) -> IsString Digest
forall a. (String -> a) -> IsString a
$cfromString :: String -> Digest
fromString :: String -> Digest
IsString)

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

newtype Ports
  = Ports
      { Ports -> [PortSpec]
unPorts :: [PortSpec]
      }
  deriving (Int -> Ports -> ShowS
[Ports] -> ShowS
Ports -> String
(Int -> Ports -> ShowS)
-> (Ports -> String) -> ([Ports] -> ShowS) -> Show Ports
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Ports -> ShowS
showsPrec :: Int -> Ports -> ShowS
$cshow :: Ports -> String
show :: Ports -> String
$cshowList :: [Ports] -> ShowS
showList :: [Ports] -> ShowS
Show, Ports -> Ports -> Bool
(Ports -> Ports -> Bool) -> (Ports -> Ports -> Bool) -> Eq Ports
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Ports -> Ports -> Bool
== :: Ports -> Ports -> Bool
$c/= :: Ports -> Ports -> Bool
/= :: Ports -> Ports -> Bool
Eq, Eq Ports
Eq Ports =>
(Ports -> Ports -> Ordering)
-> (Ports -> Ports -> Bool)
-> (Ports -> Ports -> Bool)
-> (Ports -> Ports -> Bool)
-> (Ports -> Ports -> Bool)
-> (Ports -> Ports -> Ports)
-> (Ports -> Ports -> Ports)
-> Ord Ports
Ports -> Ports -> Bool
Ports -> Ports -> Ordering
Ports -> Ports -> Ports
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 :: Ports -> Ports -> Ordering
compare :: Ports -> Ports -> Ordering
$c< :: Ports -> Ports -> Bool
< :: Ports -> Ports -> Bool
$c<= :: Ports -> Ports -> Bool
<= :: Ports -> Ports -> Bool
$c> :: Ports -> Ports -> Bool
> :: Ports -> Ports -> Bool
$c>= :: Ports -> Ports -> Bool
>= :: Ports -> Ports -> Bool
$cmax :: Ports -> Ports -> Ports
max :: Ports -> Ports -> Ports
$cmin :: Ports -> Ports -> Ports
min :: Ports -> Ports -> Ports
Ord)

instance IsList Ports where
  type Item Ports = PortSpec
  fromList :: [Item Ports] -> Ports
fromList = [Item Ports] -> Ports
[PortSpec] -> Ports
Ports
  toList :: Ports -> [Item Ports]
toList (Ports [PortSpec]
ps) = [Item Ports]
[PortSpec]
ps

type Directory = Text

type Platform = Text

newtype ImageAlias
  = ImageAlias
      { ImageAlias -> Text
unImageAlias :: Text
      }
  deriving (Int -> ImageAlias -> ShowS
[ImageAlias] -> ShowS
ImageAlias -> String
(Int -> ImageAlias -> ShowS)
-> (ImageAlias -> String)
-> ([ImageAlias] -> ShowS)
-> Show ImageAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ImageAlias -> ShowS
showsPrec :: Int -> ImageAlias -> ShowS
$cshow :: ImageAlias -> String
show :: ImageAlias -> String
$cshowList :: [ImageAlias] -> ShowS
showList :: [ImageAlias] -> ShowS
Show, ImageAlias -> ImageAlias -> Bool
(ImageAlias -> ImageAlias -> Bool)
-> (ImageAlias -> ImageAlias -> Bool) -> Eq ImageAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImageAlias -> ImageAlias -> Bool
== :: ImageAlias -> ImageAlias -> Bool
$c/= :: ImageAlias -> ImageAlias -> Bool
/= :: ImageAlias -> ImageAlias -> Bool
Eq, Eq ImageAlias
Eq ImageAlias =>
(ImageAlias -> ImageAlias -> Ordering)
-> (ImageAlias -> ImageAlias -> Bool)
-> (ImageAlias -> ImageAlias -> Bool)
-> (ImageAlias -> ImageAlias -> Bool)
-> (ImageAlias -> ImageAlias -> Bool)
-> (ImageAlias -> ImageAlias -> ImageAlias)
-> (ImageAlias -> ImageAlias -> ImageAlias)
-> Ord ImageAlias
ImageAlias -> ImageAlias -> Bool
ImageAlias -> ImageAlias -> Ordering
ImageAlias -> ImageAlias -> ImageAlias
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 :: ImageAlias -> ImageAlias -> Ordering
compare :: ImageAlias -> ImageAlias -> Ordering
$c< :: ImageAlias -> ImageAlias -> Bool
< :: ImageAlias -> ImageAlias -> Bool
$c<= :: ImageAlias -> ImageAlias -> Bool
<= :: ImageAlias -> ImageAlias -> Bool
$c> :: ImageAlias -> ImageAlias -> Bool
> :: ImageAlias -> ImageAlias -> Bool
$c>= :: ImageAlias -> ImageAlias -> Bool
>= :: ImageAlias -> ImageAlias -> Bool
$cmax :: ImageAlias -> ImageAlias -> ImageAlias
max :: ImageAlias -> ImageAlias -> ImageAlias
$cmin :: ImageAlias -> ImageAlias -> ImageAlias
min :: ImageAlias -> ImageAlias -> ImageAlias
Ord, String -> ImageAlias
(String -> ImageAlias) -> IsString ImageAlias
forall a. (String -> a) -> IsString a
$cfromString :: String -> ImageAlias
fromString :: String -> ImageAlias
IsString)

data BaseImage
  = BaseImage
      { BaseImage -> Image
image :: !Image,
        BaseImage -> Maybe Tag
tag :: !(Maybe Tag),
        BaseImage -> Maybe Digest
digest :: !(Maybe Digest),
        BaseImage -> Maybe ImageAlias
alias :: !(Maybe ImageAlias),
        BaseImage -> Maybe Text
platform :: !(Maybe Platform)
      }
  deriving (BaseImage -> BaseImage -> Bool
(BaseImage -> BaseImage -> Bool)
-> (BaseImage -> BaseImage -> Bool) -> Eq BaseImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BaseImage -> BaseImage -> Bool
== :: BaseImage -> BaseImage -> Bool
$c/= :: BaseImage -> BaseImage -> Bool
/= :: BaseImage -> BaseImage -> Bool
Eq, Eq BaseImage
Eq BaseImage =>
(BaseImage -> BaseImage -> Ordering)
-> (BaseImage -> BaseImage -> Bool)
-> (BaseImage -> BaseImage -> Bool)
-> (BaseImage -> BaseImage -> Bool)
-> (BaseImage -> BaseImage -> Bool)
-> (BaseImage -> BaseImage -> BaseImage)
-> (BaseImage -> BaseImage -> BaseImage)
-> Ord BaseImage
BaseImage -> BaseImage -> Bool
BaseImage -> BaseImage -> Ordering
BaseImage -> BaseImage -> BaseImage
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 :: BaseImage -> BaseImage -> Ordering
compare :: BaseImage -> BaseImage -> Ordering
$c< :: BaseImage -> BaseImage -> Bool
< :: BaseImage -> BaseImage -> Bool
$c<= :: BaseImage -> BaseImage -> Bool
<= :: BaseImage -> BaseImage -> Bool
$c> :: BaseImage -> BaseImage -> Bool
> :: BaseImage -> BaseImage -> Bool
$c>= :: BaseImage -> BaseImage -> Bool
>= :: BaseImage -> BaseImage -> Bool
$cmax :: BaseImage -> BaseImage -> BaseImage
max :: BaseImage -> BaseImage -> BaseImage
$cmin :: BaseImage -> BaseImage -> BaseImage
min :: BaseImage -> BaseImage -> BaseImage
Ord, Int -> BaseImage -> ShowS
[BaseImage] -> ShowS
BaseImage -> String
(Int -> BaseImage -> ShowS)
-> (BaseImage -> String)
-> ([BaseImage] -> ShowS)
-> Show BaseImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BaseImage -> ShowS
showsPrec :: Int -> BaseImage -> ShowS
$cshow :: BaseImage -> String
show :: BaseImage -> String
$cshowList :: [BaseImage] -> ShowS
showList :: [BaseImage] -> ShowS
Show)

-- | Type of the Dockerfile AST
type Dockerfile = [InstructionPos Text]

newtype SourcePath
  = SourcePath
      { SourcePath -> Text
unSourcePath :: Text
      }
  deriving (Int -> SourcePath -> ShowS
[SourcePath] -> ShowS
SourcePath -> String
(Int -> SourcePath -> ShowS)
-> (SourcePath -> String)
-> ([SourcePath] -> ShowS)
-> Show SourcePath
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourcePath -> ShowS
showsPrec :: Int -> SourcePath -> ShowS
$cshow :: SourcePath -> String
show :: SourcePath -> String
$cshowList :: [SourcePath] -> ShowS
showList :: [SourcePath] -> ShowS
Show, SourcePath -> SourcePath -> Bool
(SourcePath -> SourcePath -> Bool)
-> (SourcePath -> SourcePath -> Bool) -> Eq SourcePath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourcePath -> SourcePath -> Bool
== :: SourcePath -> SourcePath -> Bool
$c/= :: SourcePath -> SourcePath -> Bool
/= :: SourcePath -> SourcePath -> Bool
Eq, Eq SourcePath
Eq SourcePath =>
(SourcePath -> SourcePath -> Ordering)
-> (SourcePath -> SourcePath -> Bool)
-> (SourcePath -> SourcePath -> Bool)
-> (SourcePath -> SourcePath -> Bool)
-> (SourcePath -> SourcePath -> Bool)
-> (SourcePath -> SourcePath -> SourcePath)
-> (SourcePath -> SourcePath -> SourcePath)
-> Ord SourcePath
SourcePath -> SourcePath -> Bool
SourcePath -> SourcePath -> Ordering
SourcePath -> SourcePath -> SourcePath
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 :: SourcePath -> SourcePath -> Ordering
compare :: SourcePath -> SourcePath -> Ordering
$c< :: SourcePath -> SourcePath -> Bool
< :: SourcePath -> SourcePath -> Bool
$c<= :: SourcePath -> SourcePath -> Bool
<= :: SourcePath -> SourcePath -> Bool
$c> :: SourcePath -> SourcePath -> Bool
> :: SourcePath -> SourcePath -> Bool
$c>= :: SourcePath -> SourcePath -> Bool
>= :: SourcePath -> SourcePath -> Bool
$cmax :: SourcePath -> SourcePath -> SourcePath
max :: SourcePath -> SourcePath -> SourcePath
$cmin :: SourcePath -> SourcePath -> SourcePath
min :: SourcePath -> SourcePath -> SourcePath
Ord, String -> SourcePath
(String -> SourcePath) -> IsString SourcePath
forall a. (String -> a) -> IsString a
$cfromString :: String -> SourcePath
fromString :: String -> SourcePath
IsString)

newtype TargetPath
  = TargetPath
      { TargetPath -> Text
unTargetPath :: Text
      }
  deriving (Int -> TargetPath -> ShowS
[TargetPath] -> ShowS
TargetPath -> String
(Int -> TargetPath -> ShowS)
-> (TargetPath -> String)
-> ([TargetPath] -> ShowS)
-> Show TargetPath
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetPath -> ShowS
showsPrec :: Int -> TargetPath -> ShowS
$cshow :: TargetPath -> String
show :: TargetPath -> String
$cshowList :: [TargetPath] -> ShowS
showList :: [TargetPath] -> ShowS
Show, TargetPath -> TargetPath -> Bool
(TargetPath -> TargetPath -> Bool)
-> (TargetPath -> TargetPath -> Bool) -> Eq TargetPath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetPath -> TargetPath -> Bool
== :: TargetPath -> TargetPath -> Bool
$c/= :: TargetPath -> TargetPath -> Bool
/= :: TargetPath -> TargetPath -> Bool
Eq, Eq TargetPath
Eq TargetPath =>
(TargetPath -> TargetPath -> Ordering)
-> (TargetPath -> TargetPath -> Bool)
-> (TargetPath -> TargetPath -> Bool)
-> (TargetPath -> TargetPath -> Bool)
-> (TargetPath -> TargetPath -> Bool)
-> (TargetPath -> TargetPath -> TargetPath)
-> (TargetPath -> TargetPath -> TargetPath)
-> Ord TargetPath
TargetPath -> TargetPath -> Bool
TargetPath -> TargetPath -> Ordering
TargetPath -> TargetPath -> TargetPath
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 :: TargetPath -> TargetPath -> Ordering
compare :: TargetPath -> TargetPath -> Ordering
$c< :: TargetPath -> TargetPath -> Bool
< :: TargetPath -> TargetPath -> Bool
$c<= :: TargetPath -> TargetPath -> Bool
<= :: TargetPath -> TargetPath -> Bool
$c> :: TargetPath -> TargetPath -> Bool
> :: TargetPath -> TargetPath -> Bool
$c>= :: TargetPath -> TargetPath -> Bool
>= :: TargetPath -> TargetPath -> Bool
$cmax :: TargetPath -> TargetPath -> TargetPath
max :: TargetPath -> TargetPath -> TargetPath
$cmin :: TargetPath -> TargetPath -> TargetPath
min :: TargetPath -> TargetPath -> TargetPath
Ord, String -> TargetPath
(String -> TargetPath) -> IsString TargetPath
forall a. (String -> a) -> IsString a
$cfromString :: String -> TargetPath
fromString :: String -> TargetPath
IsString)

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

instance IsString Checksum where
  fromString :: String -> Checksum
fromString String
ch =
    case String
ch of
      String
"" -> Checksum
NoChecksum
      String
_ -> Text -> Checksum
Checksum (String -> Text
Text.pack String
ch)

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

instance IsString Chown where
  fromString :: String -> Chown
fromString String
ch =
    case String
ch of
      String
"" -> Chown
NoChown
      String
_ -> Text -> Chown
Chown (String -> Text
Text.pack String
ch)

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

instance IsString Chmod where
  fromString :: String -> Chmod
fromString String
ch =
    case String
ch of
      String
"" -> Chmod
NoChmod
      String
_ -> Text -> Chmod
Chmod (String -> Text
Text.pack String
ch)

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

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

instance IsString CopySource where
  fromString :: String -> CopySource
fromString String
src =
    case String
src of
      String
"" -> CopySource
NoSource
      String
_ -> Text -> CopySource
CopySource (String -> Text
Text.pack String
src)

newtype Duration
  = Duration
      { Duration -> DiffTime
durationTime :: DiffTime
      }
  deriving (Int -> Duration -> ShowS
[Duration] -> ShowS
Duration -> String
(Int -> Duration -> ShowS)
-> (Duration -> String) -> ([Duration] -> ShowS) -> Show Duration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Duration -> ShowS
showsPrec :: Int -> Duration -> ShowS
$cshow :: Duration -> String
show :: Duration -> String
$cshowList :: [Duration] -> ShowS
showList :: [Duration] -> ShowS
Show, Duration -> Duration -> Bool
(Duration -> Duration -> Bool)
-> (Duration -> Duration -> Bool) -> Eq Duration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Duration -> Duration -> Bool
== :: Duration -> Duration -> Bool
$c/= :: Duration -> Duration -> Bool
/= :: Duration -> Duration -> Bool
Eq, Eq Duration
Eq Duration =>
(Duration -> Duration -> Ordering)
-> (Duration -> Duration -> Bool)
-> (Duration -> Duration -> Bool)
-> (Duration -> Duration -> Bool)
-> (Duration -> Duration -> Bool)
-> (Duration -> Duration -> Duration)
-> (Duration -> Duration -> Duration)
-> Ord Duration
Duration -> Duration -> Bool
Duration -> Duration -> Ordering
Duration -> Duration -> Duration
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 :: Duration -> Duration -> Ordering
compare :: Duration -> Duration -> Ordering
$c< :: Duration -> Duration -> Bool
< :: Duration -> Duration -> Bool
$c<= :: Duration -> Duration -> Bool
<= :: Duration -> Duration -> Bool
$c> :: Duration -> Duration -> Bool
> :: Duration -> Duration -> Bool
$c>= :: Duration -> Duration -> Bool
>= :: Duration -> Duration -> Bool
$cmax :: Duration -> Duration -> Duration
max :: Duration -> Duration -> Duration
$cmin :: Duration -> Duration -> Duration
min :: Duration -> Duration -> Duration
Ord, Integer -> Duration
Duration -> Duration
Duration -> Duration -> Duration
(Duration -> Duration -> Duration)
-> (Duration -> Duration -> Duration)
-> (Duration -> Duration -> Duration)
-> (Duration -> Duration)
-> (Duration -> Duration)
-> (Duration -> Duration)
-> (Integer -> Duration)
-> Num Duration
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Duration -> Duration -> Duration
+ :: Duration -> Duration -> Duration
$c- :: Duration -> Duration -> Duration
- :: Duration -> Duration -> Duration
$c* :: Duration -> Duration -> Duration
* :: Duration -> Duration -> Duration
$cnegate :: Duration -> Duration
negate :: Duration -> Duration
$cabs :: Duration -> Duration
abs :: Duration -> Duration
$csignum :: Duration -> Duration
signum :: Duration -> Duration
$cfromInteger :: Integer -> Duration
fromInteger :: Integer -> Duration
Num, Num Duration
Num Duration =>
(Duration -> Duration -> Duration)
-> (Duration -> Duration)
-> (Rational -> Duration)
-> Fractional Duration
Rational -> Duration
Duration -> Duration
Duration -> Duration -> Duration
forall a.
Num a =>
(a -> a -> a) -> (a -> a) -> (Rational -> a) -> Fractional a
$c/ :: Duration -> Duration -> Duration
/ :: Duration -> Duration -> Duration
$crecip :: Duration -> Duration
recip :: Duration -> Duration
$cfromRational :: Rational -> Duration
fromRational :: Rational -> Duration
Fractional)

newtype Retries
  = Retries
      { Retries -> Int
times :: Int
      }
  deriving (Int -> Retries -> ShowS
[Retries] -> ShowS
Retries -> String
(Int -> Retries -> ShowS)
-> (Retries -> String) -> ([Retries] -> ShowS) -> Show Retries
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Retries -> ShowS
showsPrec :: Int -> Retries -> ShowS
$cshow :: Retries -> String
show :: Retries -> String
$cshowList :: [Retries] -> ShowS
showList :: [Retries] -> ShowS
Show, Retries -> Retries -> Bool
(Retries -> Retries -> Bool)
-> (Retries -> Retries -> Bool) -> Eq Retries
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Retries -> Retries -> Bool
== :: Retries -> Retries -> Bool
$c/= :: Retries -> Retries -> Bool
/= :: Retries -> Retries -> Bool
Eq, Eq Retries
Eq Retries =>
(Retries -> Retries -> Ordering)
-> (Retries -> Retries -> Bool)
-> (Retries -> Retries -> Bool)
-> (Retries -> Retries -> Bool)
-> (Retries -> Retries -> Bool)
-> (Retries -> Retries -> Retries)
-> (Retries -> Retries -> Retries)
-> Ord Retries
Retries -> Retries -> Bool
Retries -> Retries -> Ordering
Retries -> Retries -> Retries
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 :: Retries -> Retries -> Ordering
compare :: Retries -> Retries -> Ordering
$c< :: Retries -> Retries -> Bool
< :: Retries -> Retries -> Bool
$c<= :: Retries -> Retries -> Bool
<= :: Retries -> Retries -> Bool
$c> :: Retries -> Retries -> Bool
> :: Retries -> Retries -> Bool
$c>= :: Retries -> Retries -> Bool
>= :: Retries -> Retries -> Bool
$cmax :: Retries -> Retries -> Retries
max :: Retries -> Retries -> Retries
$cmin :: Retries -> Retries -> Retries
min :: Retries -> Retries -> Retries
Ord, Integer -> Retries
Retries -> Retries
Retries -> Retries -> Retries
(Retries -> Retries -> Retries)
-> (Retries -> Retries -> Retries)
-> (Retries -> Retries -> Retries)
-> (Retries -> Retries)
-> (Retries -> Retries)
-> (Retries -> Retries)
-> (Integer -> Retries)
-> Num Retries
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Retries -> Retries -> Retries
+ :: Retries -> Retries -> Retries
$c- :: Retries -> Retries -> Retries
- :: Retries -> Retries -> Retries
$c* :: Retries -> Retries -> Retries
* :: Retries -> Retries -> Retries
$cnegate :: Retries -> Retries
negate :: Retries -> Retries
$cabs :: Retries -> Retries
abs :: Retries -> Retries
$csignum :: Retries -> Retries
signum :: Retries -> Retries
$cfromInteger :: Integer -> Retries
fromInteger :: Integer -> Retries
Num)

data CopyArgs
  = CopyArgs
      { CopyArgs -> NonEmpty SourcePath
sourcePaths :: NonEmpty SourcePath,
        CopyArgs -> TargetPath
targetPath :: !TargetPath
      }
  deriving (Int -> CopyArgs -> ShowS
[CopyArgs] -> ShowS
CopyArgs -> String
(Int -> CopyArgs -> ShowS)
-> (CopyArgs -> String) -> ([CopyArgs] -> ShowS) -> Show CopyArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CopyArgs -> ShowS
showsPrec :: Int -> CopyArgs -> ShowS
$cshow :: CopyArgs -> String
show :: CopyArgs -> String
$cshowList :: [CopyArgs] -> ShowS
showList :: [CopyArgs] -> ShowS
Show, CopyArgs -> CopyArgs -> Bool
(CopyArgs -> CopyArgs -> Bool)
-> (CopyArgs -> CopyArgs -> Bool) -> Eq CopyArgs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CopyArgs -> CopyArgs -> Bool
== :: CopyArgs -> CopyArgs -> Bool
$c/= :: CopyArgs -> CopyArgs -> Bool
/= :: CopyArgs -> CopyArgs -> Bool
Eq, Eq CopyArgs
Eq CopyArgs =>
(CopyArgs -> CopyArgs -> Ordering)
-> (CopyArgs -> CopyArgs -> Bool)
-> (CopyArgs -> CopyArgs -> Bool)
-> (CopyArgs -> CopyArgs -> Bool)
-> (CopyArgs -> CopyArgs -> Bool)
-> (CopyArgs -> CopyArgs -> CopyArgs)
-> (CopyArgs -> CopyArgs -> CopyArgs)
-> Ord CopyArgs
CopyArgs -> CopyArgs -> Bool
CopyArgs -> CopyArgs -> Ordering
CopyArgs -> CopyArgs -> CopyArgs
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 :: CopyArgs -> CopyArgs -> Ordering
compare :: CopyArgs -> CopyArgs -> Ordering
$c< :: CopyArgs -> CopyArgs -> Bool
< :: CopyArgs -> CopyArgs -> Bool
$c<= :: CopyArgs -> CopyArgs -> Bool
<= :: CopyArgs -> CopyArgs -> Bool
$c> :: CopyArgs -> CopyArgs -> Bool
> :: CopyArgs -> CopyArgs -> Bool
$c>= :: CopyArgs -> CopyArgs -> Bool
>= :: CopyArgs -> CopyArgs -> Bool
$cmax :: CopyArgs -> CopyArgs -> CopyArgs
max :: CopyArgs -> CopyArgs -> CopyArgs
$cmin :: CopyArgs -> CopyArgs -> CopyArgs
min :: CopyArgs -> CopyArgs -> CopyArgs
Ord)

data CopyFlags
  = CopyFlags
      { CopyFlags -> Chown
chownFlag :: !Chown,
        CopyFlags -> Chmod
chmodFlag :: !Chmod,
        CopyFlags -> Link
linkFlag :: !Link,
        CopyFlags -> CopySource
sourceFlag :: !CopySource
      }
  deriving (Int -> CopyFlags -> ShowS
[CopyFlags] -> ShowS
CopyFlags -> String
(Int -> CopyFlags -> ShowS)
-> (CopyFlags -> String)
-> ([CopyFlags] -> ShowS)
-> Show CopyFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CopyFlags -> ShowS
showsPrec :: Int -> CopyFlags -> ShowS
$cshow :: CopyFlags -> String
show :: CopyFlags -> String
$cshowList :: [CopyFlags] -> ShowS
showList :: [CopyFlags] -> ShowS
Show, CopyFlags -> CopyFlags -> Bool
(CopyFlags -> CopyFlags -> Bool)
-> (CopyFlags -> CopyFlags -> Bool) -> Eq CopyFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CopyFlags -> CopyFlags -> Bool
== :: CopyFlags -> CopyFlags -> Bool
$c/= :: CopyFlags -> CopyFlags -> Bool
/= :: CopyFlags -> CopyFlags -> Bool
Eq, Eq CopyFlags
Eq CopyFlags =>
(CopyFlags -> CopyFlags -> Ordering)
-> (CopyFlags -> CopyFlags -> Bool)
-> (CopyFlags -> CopyFlags -> Bool)
-> (CopyFlags -> CopyFlags -> Bool)
-> (CopyFlags -> CopyFlags -> Bool)
-> (CopyFlags -> CopyFlags -> CopyFlags)
-> (CopyFlags -> CopyFlags -> CopyFlags)
-> Ord CopyFlags
CopyFlags -> CopyFlags -> Bool
CopyFlags -> CopyFlags -> Ordering
CopyFlags -> CopyFlags -> CopyFlags
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 :: CopyFlags -> CopyFlags -> Ordering
compare :: CopyFlags -> CopyFlags -> Ordering
$c< :: CopyFlags -> CopyFlags -> Bool
< :: CopyFlags -> CopyFlags -> Bool
$c<= :: CopyFlags -> CopyFlags -> Bool
<= :: CopyFlags -> CopyFlags -> Bool
$c> :: CopyFlags -> CopyFlags -> Bool
> :: CopyFlags -> CopyFlags -> Bool
$c>= :: CopyFlags -> CopyFlags -> Bool
>= :: CopyFlags -> CopyFlags -> Bool
$cmax :: CopyFlags -> CopyFlags -> CopyFlags
max :: CopyFlags -> CopyFlags -> CopyFlags
$cmin :: CopyFlags -> CopyFlags -> CopyFlags
min :: CopyFlags -> CopyFlags -> CopyFlags
Ord)

instance Default CopyFlags where
  def :: CopyFlags
def = Chown -> Chmod -> Link -> CopySource -> CopyFlags
CopyFlags Chown
NoChown Chmod
NoChmod Link
NoLink CopySource
NoSource

data AddArgs
  = AddArgs
      { AddArgs -> NonEmpty SourcePath
sourcePaths :: NonEmpty SourcePath,
        AddArgs -> TargetPath
targetPath :: !TargetPath
      }
  deriving (Int -> AddArgs -> ShowS
[AddArgs] -> ShowS
AddArgs -> String
(Int -> AddArgs -> ShowS)
-> (AddArgs -> String) -> ([AddArgs] -> ShowS) -> Show AddArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddArgs -> ShowS
showsPrec :: Int -> AddArgs -> ShowS
$cshow :: AddArgs -> String
show :: AddArgs -> String
$cshowList :: [AddArgs] -> ShowS
showList :: [AddArgs] -> ShowS
Show, AddArgs -> AddArgs -> Bool
(AddArgs -> AddArgs -> Bool)
-> (AddArgs -> AddArgs -> Bool) -> Eq AddArgs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddArgs -> AddArgs -> Bool
== :: AddArgs -> AddArgs -> Bool
$c/= :: AddArgs -> AddArgs -> Bool
/= :: AddArgs -> AddArgs -> Bool
Eq, Eq AddArgs
Eq AddArgs =>
(AddArgs -> AddArgs -> Ordering)
-> (AddArgs -> AddArgs -> Bool)
-> (AddArgs -> AddArgs -> Bool)
-> (AddArgs -> AddArgs -> Bool)
-> (AddArgs -> AddArgs -> Bool)
-> (AddArgs -> AddArgs -> AddArgs)
-> (AddArgs -> AddArgs -> AddArgs)
-> Ord AddArgs
AddArgs -> AddArgs -> Bool
AddArgs -> AddArgs -> Ordering
AddArgs -> AddArgs -> AddArgs
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 :: AddArgs -> AddArgs -> Ordering
compare :: AddArgs -> AddArgs -> Ordering
$c< :: AddArgs -> AddArgs -> Bool
< :: AddArgs -> AddArgs -> Bool
$c<= :: AddArgs -> AddArgs -> Bool
<= :: AddArgs -> AddArgs -> Bool
$c> :: AddArgs -> AddArgs -> Bool
> :: AddArgs -> AddArgs -> Bool
$c>= :: AddArgs -> AddArgs -> Bool
>= :: AddArgs -> AddArgs -> Bool
$cmax :: AddArgs -> AddArgs -> AddArgs
max :: AddArgs -> AddArgs -> AddArgs
$cmin :: AddArgs -> AddArgs -> AddArgs
min :: AddArgs -> AddArgs -> AddArgs
Ord)

data AddFlags
  = AddFlags
      { AddFlags -> Checksum
checksumFlag :: !Checksum,
        AddFlags -> Chown
chownFlag :: !Chown,
        AddFlags -> Chmod
chmodFlag :: !Chmod,
        AddFlags -> Link
linkFlag :: !Link
      }
  deriving (Int -> AddFlags -> ShowS
[AddFlags] -> ShowS
AddFlags -> String
(Int -> AddFlags -> ShowS)
-> (AddFlags -> String) -> ([AddFlags] -> ShowS) -> Show AddFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddFlags -> ShowS
showsPrec :: Int -> AddFlags -> ShowS
$cshow :: AddFlags -> String
show :: AddFlags -> String
$cshowList :: [AddFlags] -> ShowS
showList :: [AddFlags] -> ShowS
Show, AddFlags -> AddFlags -> Bool
(AddFlags -> AddFlags -> Bool)
-> (AddFlags -> AddFlags -> Bool) -> Eq AddFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddFlags -> AddFlags -> Bool
== :: AddFlags -> AddFlags -> Bool
$c/= :: AddFlags -> AddFlags -> Bool
/= :: AddFlags -> AddFlags -> Bool
Eq, Eq AddFlags
Eq AddFlags =>
(AddFlags -> AddFlags -> Ordering)
-> (AddFlags -> AddFlags -> Bool)
-> (AddFlags -> AddFlags -> Bool)
-> (AddFlags -> AddFlags -> Bool)
-> (AddFlags -> AddFlags -> Bool)
-> (AddFlags -> AddFlags -> AddFlags)
-> (AddFlags -> AddFlags -> AddFlags)
-> Ord AddFlags
AddFlags -> AddFlags -> Bool
AddFlags -> AddFlags -> Ordering
AddFlags -> AddFlags -> AddFlags
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 :: AddFlags -> AddFlags -> Ordering
compare :: AddFlags -> AddFlags -> Ordering
$c< :: AddFlags -> AddFlags -> Bool
< :: AddFlags -> AddFlags -> Bool
$c<= :: AddFlags -> AddFlags -> Bool
<= :: AddFlags -> AddFlags -> Bool
$c> :: AddFlags -> AddFlags -> Bool
> :: AddFlags -> AddFlags -> Bool
$c>= :: AddFlags -> AddFlags -> Bool
>= :: AddFlags -> AddFlags -> Bool
$cmax :: AddFlags -> AddFlags -> AddFlags
max :: AddFlags -> AddFlags -> AddFlags
$cmin :: AddFlags -> AddFlags -> AddFlags
min :: AddFlags -> AddFlags -> AddFlags
Ord)

instance Default AddFlags where
  def :: AddFlags
def = Checksum -> Chown -> Chmod -> Link -> AddFlags
AddFlags Checksum
NoChecksum Chown
NoChown Chmod
NoChmod Link
NoLink

data Check args
  = Check !(CheckArgs args)
  | NoCheck
  deriving (Int -> Check args -> ShowS
[Check args] -> ShowS
Check args -> String
(Int -> Check args -> ShowS)
-> (Check args -> String)
-> ([Check args] -> ShowS)
-> Show (Check args)
forall args. Show args => Int -> Check args -> ShowS
forall args. Show args => [Check args] -> ShowS
forall args. Show args => Check args -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall args. Show args => Int -> Check args -> ShowS
showsPrec :: Int -> Check args -> ShowS
$cshow :: forall args. Show args => Check args -> String
show :: Check args -> String
$cshowList :: forall args. Show args => [Check args] -> ShowS
showList :: [Check args] -> ShowS
Show, Check args -> Check args -> Bool
(Check args -> Check args -> Bool)
-> (Check args -> Check args -> Bool) -> Eq (Check args)
forall args. Eq args => Check args -> Check args -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall args. Eq args => Check args -> Check args -> Bool
== :: Check args -> Check args -> Bool
$c/= :: forall args. Eq args => Check args -> Check args -> Bool
/= :: Check args -> Check args -> Bool
Eq, Eq (Check args)
Eq (Check args) =>
(Check args -> Check args -> Ordering)
-> (Check args -> Check args -> Bool)
-> (Check args -> Check args -> Bool)
-> (Check args -> Check args -> Bool)
-> (Check args -> Check args -> Bool)
-> (Check args -> Check args -> Check args)
-> (Check args -> Check args -> Check args)
-> Ord (Check args)
Check args -> Check args -> Bool
Check args -> Check args -> Ordering
Check args -> Check args -> Check args
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
forall args. Ord args => Eq (Check args)
forall args. Ord args => Check args -> Check args -> Bool
forall args. Ord args => Check args -> Check args -> Ordering
forall args. Ord args => Check args -> Check args -> Check args
$ccompare :: forall args. Ord args => Check args -> Check args -> Ordering
compare :: Check args -> Check args -> Ordering
$c< :: forall args. Ord args => Check args -> Check args -> Bool
< :: Check args -> Check args -> Bool
$c<= :: forall args. Ord args => Check args -> Check args -> Bool
<= :: Check args -> Check args -> Bool
$c> :: forall args. Ord args => Check args -> Check args -> Bool
> :: Check args -> Check args -> Bool
$c>= :: forall args. Ord args => Check args -> Check args -> Bool
>= :: Check args -> Check args -> Bool
$cmax :: forall args. Ord args => Check args -> Check args -> Check args
max :: Check args -> Check args -> Check args
$cmin :: forall args. Ord args => Check args -> Check args -> Check args
min :: Check args -> Check args -> Check args
Ord, (forall a b. (a -> b) -> Check a -> Check b)
-> (forall a b. a -> Check b -> Check a) -> Functor Check
forall a b. a -> Check b -> Check a
forall a b. (a -> b) -> Check a -> Check b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> Check a -> Check b
fmap :: forall a b. (a -> b) -> Check a -> Check b
$c<$ :: forall a b. a -> Check b -> Check a
<$ :: forall a b. a -> Check b -> Check a
Functor)

data Arguments args
  = ArgumentsText args
  | ArgumentsList args
  deriving (Int -> Arguments args -> ShowS
[Arguments args] -> ShowS
Arguments args -> String
(Int -> Arguments args -> ShowS)
-> (Arguments args -> String)
-> ([Arguments args] -> ShowS)
-> Show (Arguments args)
forall args. Show args => Int -> Arguments args -> ShowS
forall args. Show args => [Arguments args] -> ShowS
forall args. Show args => Arguments args -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall args. Show args => Int -> Arguments args -> ShowS
showsPrec :: Int -> Arguments args -> ShowS
$cshow :: forall args. Show args => Arguments args -> String
show :: Arguments args -> String
$cshowList :: forall args. Show args => [Arguments args] -> ShowS
showList :: [Arguments args] -> ShowS
Show, Arguments args -> Arguments args -> Bool
(Arguments args -> Arguments args -> Bool)
-> (Arguments args -> Arguments args -> Bool)
-> Eq (Arguments args)
forall args. Eq args => Arguments args -> Arguments args -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall args. Eq args => Arguments args -> Arguments args -> Bool
== :: Arguments args -> Arguments args -> Bool
$c/= :: forall args. Eq args => Arguments args -> Arguments args -> Bool
/= :: Arguments args -> Arguments args -> Bool
Eq, Eq (Arguments args)
Eq (Arguments args) =>
(Arguments args -> Arguments args -> Ordering)
-> (Arguments args -> Arguments args -> Bool)
-> (Arguments args -> Arguments args -> Bool)
-> (Arguments args -> Arguments args -> Bool)
-> (Arguments args -> Arguments args -> Bool)
-> (Arguments args -> Arguments args -> Arguments args)
-> (Arguments args -> Arguments args -> Arguments args)
-> Ord (Arguments args)
Arguments args -> Arguments args -> Bool
Arguments args -> Arguments args -> Ordering
Arguments args -> Arguments args -> Arguments args
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
forall args. Ord args => Eq (Arguments args)
forall args. Ord args => Arguments args -> Arguments args -> Bool
forall args.
Ord args =>
Arguments args -> Arguments args -> Ordering
forall args.
Ord args =>
Arguments args -> Arguments args -> Arguments args
$ccompare :: forall args.
Ord args =>
Arguments args -> Arguments args -> Ordering
compare :: Arguments args -> Arguments args -> Ordering
$c< :: forall args. Ord args => Arguments args -> Arguments args -> Bool
< :: Arguments args -> Arguments args -> Bool
$c<= :: forall args. Ord args => Arguments args -> Arguments args -> Bool
<= :: Arguments args -> Arguments args -> Bool
$c> :: forall args. Ord args => Arguments args -> Arguments args -> Bool
> :: Arguments args -> Arguments args -> Bool
$c>= :: forall args. Ord args => Arguments args -> Arguments args -> Bool
>= :: Arguments args -> Arguments args -> Bool
$cmax :: forall args.
Ord args =>
Arguments args -> Arguments args -> Arguments args
max :: Arguments args -> Arguments args -> Arguments args
$cmin :: forall args.
Ord args =>
Arguments args -> Arguments args -> Arguments args
min :: Arguments args -> Arguments args -> Arguments args
Ord, (forall a b. (a -> b) -> Arguments a -> Arguments b)
-> (forall a b. a -> Arguments b -> Arguments a)
-> Functor Arguments
forall a b. a -> Arguments b -> Arguments a
forall a b. (a -> b) -> Arguments a -> Arguments b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> Arguments a -> Arguments b
fmap :: forall a b. (a -> b) -> Arguments a -> Arguments b
$c<$ :: forall a b. a -> Arguments b -> Arguments a
<$ :: forall a b. a -> Arguments b -> Arguments a
Functor)

instance IsString (Arguments Text) where
  fromString :: String -> Arguments Text
fromString = Text -> Arguments Text
forall args. args -> Arguments args
ArgumentsText (Text -> Arguments Text)
-> (String -> Text) -> String -> Arguments Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack

instance IsList (Arguments Text) where
  type Item (Arguments Text) = Text
  fromList :: [Item (Arguments Text)] -> Arguments Text
fromList = Text -> Arguments Text
forall args. args -> Arguments args
ArgumentsList (Text -> Arguments Text)
-> ([Text] -> Text) -> [Text] -> Arguments Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Text] -> Text
Text.unwords
  toList :: Arguments Text -> [Item (Arguments Text)]
toList (ArgumentsText Text
ps) = Text -> [Text]
Text.words Text
ps
  toList (ArgumentsList Text
ps) = Text -> [Text]
Text.words Text
ps

data CheckArgs args
  = CheckArgs
      { forall args. CheckArgs args -> Arguments args
checkCommand :: !(Arguments args),
        forall args. CheckArgs args -> Maybe Duration
interval :: !(Maybe Duration),
        forall args. CheckArgs args -> Maybe Duration
timeout :: !(Maybe Duration),
        forall args. CheckArgs args -> Maybe Duration
startPeriod :: !(Maybe Duration),
        forall args. CheckArgs args -> Maybe Retries
retries :: !(Maybe Retries)
      }
  deriving (Int -> CheckArgs args -> ShowS
[CheckArgs args] -> ShowS
CheckArgs args -> String
(Int -> CheckArgs args -> ShowS)
-> (CheckArgs args -> String)
-> ([CheckArgs args] -> ShowS)
-> Show (CheckArgs args)
forall args. Show args => Int -> CheckArgs args -> ShowS
forall args. Show args => [CheckArgs args] -> ShowS
forall args. Show args => CheckArgs args -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall args. Show args => Int -> CheckArgs args -> ShowS
showsPrec :: Int -> CheckArgs args -> ShowS
$cshow :: forall args. Show args => CheckArgs args -> String
show :: CheckArgs args -> String
$cshowList :: forall args. Show args => [CheckArgs args] -> ShowS
showList :: [CheckArgs args] -> ShowS
Show, CheckArgs args -> CheckArgs args -> Bool
(CheckArgs args -> CheckArgs args -> Bool)
-> (CheckArgs args -> CheckArgs args -> Bool)
-> Eq (CheckArgs args)
forall args. Eq args => CheckArgs args -> CheckArgs args -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall args. Eq args => CheckArgs args -> CheckArgs args -> Bool
== :: CheckArgs args -> CheckArgs args -> Bool
$c/= :: forall args. Eq args => CheckArgs args -> CheckArgs args -> Bool
/= :: CheckArgs args -> CheckArgs args -> Bool
Eq, Eq (CheckArgs args)
Eq (CheckArgs args) =>
(CheckArgs args -> CheckArgs args -> Ordering)
-> (CheckArgs args -> CheckArgs args -> Bool)
-> (CheckArgs args -> CheckArgs args -> Bool)
-> (CheckArgs args -> CheckArgs args -> Bool)
-> (CheckArgs args -> CheckArgs args -> Bool)
-> (CheckArgs args -> CheckArgs args -> CheckArgs args)
-> (CheckArgs args -> CheckArgs args -> CheckArgs args)
-> Ord (CheckArgs args)
CheckArgs args -> CheckArgs args -> Bool
CheckArgs args -> CheckArgs args -> Ordering
CheckArgs args -> CheckArgs args -> CheckArgs args
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
forall args. Ord args => Eq (CheckArgs args)
forall args. Ord args => CheckArgs args -> CheckArgs args -> Bool
forall args.
Ord args =>
CheckArgs args -> CheckArgs args -> Ordering
forall args.
Ord args =>
CheckArgs args -> CheckArgs args -> CheckArgs args
$ccompare :: forall args.
Ord args =>
CheckArgs args -> CheckArgs args -> Ordering
compare :: CheckArgs args -> CheckArgs args -> Ordering
$c< :: forall args. Ord args => CheckArgs args -> CheckArgs args -> Bool
< :: CheckArgs args -> CheckArgs args -> Bool
$c<= :: forall args. Ord args => CheckArgs args -> CheckArgs args -> Bool
<= :: CheckArgs args -> CheckArgs args -> Bool
$c> :: forall args. Ord args => CheckArgs args -> CheckArgs args -> Bool
> :: CheckArgs args -> CheckArgs args -> Bool
$c>= :: forall args. Ord args => CheckArgs args -> CheckArgs args -> Bool
>= :: CheckArgs args -> CheckArgs args -> Bool
$cmax :: forall args.
Ord args =>
CheckArgs args -> CheckArgs args -> CheckArgs args
max :: CheckArgs args -> CheckArgs args -> CheckArgs args
$cmin :: forall args.
Ord args =>
CheckArgs args -> CheckArgs args -> CheckArgs args
min :: CheckArgs args -> CheckArgs args -> CheckArgs args
Ord, (forall a b. (a -> b) -> CheckArgs a -> CheckArgs b)
-> (forall a b. a -> CheckArgs b -> CheckArgs a)
-> Functor CheckArgs
forall a b. a -> CheckArgs b -> CheckArgs a
forall a b. (a -> b) -> CheckArgs a -> CheckArgs b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> CheckArgs a -> CheckArgs b
fmap :: forall a b. (a -> b) -> CheckArgs a -> CheckArgs b
$c<$ :: forall a b. a -> CheckArgs b -> CheckArgs a
<$ :: forall a b. a -> CheckArgs b -> CheckArgs a
Functor)

type Pairs = [(Text, Text)]

data RunMount
  = BindMount !BindOpts
  | CacheMount !CacheOpts
  | TmpfsMount !TmpOpts
  | SecretMount !SecretOpts
  | SshMount !SecretOpts
  deriving (RunMount -> RunMount -> Bool
(RunMount -> RunMount -> Bool)
-> (RunMount -> RunMount -> Bool) -> Eq RunMount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RunMount -> RunMount -> Bool
== :: RunMount -> RunMount -> Bool
$c/= :: RunMount -> RunMount -> Bool
/= :: RunMount -> RunMount -> Bool
Eq, Int -> RunMount -> ShowS
[RunMount] -> ShowS
RunMount -> String
(Int -> RunMount -> ShowS)
-> (RunMount -> String) -> ([RunMount] -> ShowS) -> Show RunMount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RunMount -> ShowS
showsPrec :: Int -> RunMount -> ShowS
$cshow :: RunMount -> String
show :: RunMount -> String
$cshowList :: [RunMount] -> ShowS
showList :: [RunMount] -> ShowS
Show, Eq RunMount
Eq RunMount =>
(RunMount -> RunMount -> Ordering)
-> (RunMount -> RunMount -> Bool)
-> (RunMount -> RunMount -> Bool)
-> (RunMount -> RunMount -> Bool)
-> (RunMount -> RunMount -> Bool)
-> (RunMount -> RunMount -> RunMount)
-> (RunMount -> RunMount -> RunMount)
-> Ord RunMount
RunMount -> RunMount -> Bool
RunMount -> RunMount -> Ordering
RunMount -> RunMount -> RunMount
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 :: RunMount -> RunMount -> Ordering
compare :: RunMount -> RunMount -> Ordering
$c< :: RunMount -> RunMount -> Bool
< :: RunMount -> RunMount -> Bool
$c<= :: RunMount -> RunMount -> Bool
<= :: RunMount -> RunMount -> Bool
$c> :: RunMount -> RunMount -> Bool
> :: RunMount -> RunMount -> Bool
$c>= :: RunMount -> RunMount -> Bool
>= :: RunMount -> RunMount -> Bool
$cmax :: RunMount -> RunMount -> RunMount
max :: RunMount -> RunMount -> RunMount
$cmin :: RunMount -> RunMount -> RunMount
min :: RunMount -> RunMount -> RunMount
Ord)

data BindOpts
  = BindOpts
      { BindOpts -> TargetPath
bTarget :: !TargetPath,
        BindOpts -> Maybe SourcePath
bSource :: !(Maybe SourcePath),
        BindOpts -> Maybe Text
bFromImage :: !(Maybe Text),
        BindOpts -> Maybe Bool
bReadOnly :: !(Maybe Bool)
      }
  deriving (Int -> BindOpts -> ShowS
[BindOpts] -> ShowS
BindOpts -> String
(Int -> BindOpts -> ShowS)
-> (BindOpts -> String) -> ([BindOpts] -> ShowS) -> Show BindOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BindOpts -> ShowS
showsPrec :: Int -> BindOpts -> ShowS
$cshow :: BindOpts -> String
show :: BindOpts -> String
$cshowList :: [BindOpts] -> ShowS
showList :: [BindOpts] -> ShowS
Show, BindOpts -> BindOpts -> Bool
(BindOpts -> BindOpts -> Bool)
-> (BindOpts -> BindOpts -> Bool) -> Eq BindOpts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BindOpts -> BindOpts -> Bool
== :: BindOpts -> BindOpts -> Bool
$c/= :: BindOpts -> BindOpts -> Bool
/= :: BindOpts -> BindOpts -> Bool
Eq, Eq BindOpts
Eq BindOpts =>
(BindOpts -> BindOpts -> Ordering)
-> (BindOpts -> BindOpts -> Bool)
-> (BindOpts -> BindOpts -> Bool)
-> (BindOpts -> BindOpts -> Bool)
-> (BindOpts -> BindOpts -> Bool)
-> (BindOpts -> BindOpts -> BindOpts)
-> (BindOpts -> BindOpts -> BindOpts)
-> Ord BindOpts
BindOpts -> BindOpts -> Bool
BindOpts -> BindOpts -> Ordering
BindOpts -> BindOpts -> BindOpts
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 :: BindOpts -> BindOpts -> Ordering
compare :: BindOpts -> BindOpts -> Ordering
$c< :: BindOpts -> BindOpts -> Bool
< :: BindOpts -> BindOpts -> Bool
$c<= :: BindOpts -> BindOpts -> Bool
<= :: BindOpts -> BindOpts -> Bool
$c> :: BindOpts -> BindOpts -> Bool
> :: BindOpts -> BindOpts -> Bool
$c>= :: BindOpts -> BindOpts -> Bool
>= :: BindOpts -> BindOpts -> Bool
$cmax :: BindOpts -> BindOpts -> BindOpts
max :: BindOpts -> BindOpts -> BindOpts
$cmin :: BindOpts -> BindOpts -> BindOpts
min :: BindOpts -> BindOpts -> BindOpts
Ord)

instance Default BindOpts where
  def :: BindOpts
def = TargetPath
-> Maybe SourcePath -> Maybe Text -> Maybe Bool -> BindOpts
BindOpts TargetPath
"" Maybe SourcePath
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing Maybe Bool
forall a. Maybe a
Nothing

data CacheOpts
  = CacheOpts
      { CacheOpts -> TargetPath
cTarget :: !TargetPath,
        CacheOpts -> Maybe CacheSharing
cSharing :: !(Maybe CacheSharing),
        CacheOpts -> Maybe Text
cCacheId :: !(Maybe Text),
        CacheOpts -> Maybe Bool
cReadOnly :: !(Maybe Bool),
        CacheOpts -> Maybe Text
cFromImage :: !(Maybe Text),
        CacheOpts -> Maybe SourcePath
cSource :: !(Maybe SourcePath),
        CacheOpts -> Maybe Text
cMode :: !(Maybe Text),
        CacheOpts -> Maybe Text
cUid :: !(Maybe Text),
        CacheOpts -> Maybe Text
cGid :: !(Maybe Text)
      }
  deriving (Int -> CacheOpts -> ShowS
[CacheOpts] -> ShowS
CacheOpts -> String
(Int -> CacheOpts -> ShowS)
-> (CacheOpts -> String)
-> ([CacheOpts] -> ShowS)
-> Show CacheOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CacheOpts -> ShowS
showsPrec :: Int -> CacheOpts -> ShowS
$cshow :: CacheOpts -> String
show :: CacheOpts -> String
$cshowList :: [CacheOpts] -> ShowS
showList :: [CacheOpts] -> ShowS
Show, CacheOpts -> CacheOpts -> Bool
(CacheOpts -> CacheOpts -> Bool)
-> (CacheOpts -> CacheOpts -> Bool) -> Eq CacheOpts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CacheOpts -> CacheOpts -> Bool
== :: CacheOpts -> CacheOpts -> Bool
$c/= :: CacheOpts -> CacheOpts -> Bool
/= :: CacheOpts -> CacheOpts -> Bool
Eq, Eq CacheOpts
Eq CacheOpts =>
(CacheOpts -> CacheOpts -> Ordering)
-> (CacheOpts -> CacheOpts -> Bool)
-> (CacheOpts -> CacheOpts -> Bool)
-> (CacheOpts -> CacheOpts -> Bool)
-> (CacheOpts -> CacheOpts -> Bool)
-> (CacheOpts -> CacheOpts -> CacheOpts)
-> (CacheOpts -> CacheOpts -> CacheOpts)
-> Ord CacheOpts
CacheOpts -> CacheOpts -> Bool
CacheOpts -> CacheOpts -> Ordering
CacheOpts -> CacheOpts -> CacheOpts
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 :: CacheOpts -> CacheOpts -> Ordering
compare :: CacheOpts -> CacheOpts -> Ordering
$c< :: CacheOpts -> CacheOpts -> Bool
< :: CacheOpts -> CacheOpts -> Bool
$c<= :: CacheOpts -> CacheOpts -> Bool
<= :: CacheOpts -> CacheOpts -> Bool
$c> :: CacheOpts -> CacheOpts -> Bool
> :: CacheOpts -> CacheOpts -> Bool
$c>= :: CacheOpts -> CacheOpts -> Bool
>= :: CacheOpts -> CacheOpts -> Bool
$cmax :: CacheOpts -> CacheOpts -> CacheOpts
max :: CacheOpts -> CacheOpts -> CacheOpts
$cmin :: CacheOpts -> CacheOpts -> CacheOpts
min :: CacheOpts -> CacheOpts -> CacheOpts
Ord)

instance Default CacheOpts where
  def :: CacheOpts
def = TargetPath
-> Maybe CacheSharing
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe SourcePath
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CacheOpts
CacheOpts TargetPath
"" Maybe CacheSharing
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing Maybe Bool
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing Maybe SourcePath
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing

newtype TmpOpts = TmpOpts {TmpOpts -> TargetPath
tTarget :: TargetPath} deriving (TmpOpts -> TmpOpts -> Bool
(TmpOpts -> TmpOpts -> Bool)
-> (TmpOpts -> TmpOpts -> Bool) -> Eq TmpOpts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TmpOpts -> TmpOpts -> Bool
== :: TmpOpts -> TmpOpts -> Bool
$c/= :: TmpOpts -> TmpOpts -> Bool
/= :: TmpOpts -> TmpOpts -> Bool
Eq, Int -> TmpOpts -> ShowS
[TmpOpts] -> ShowS
TmpOpts -> String
(Int -> TmpOpts -> ShowS)
-> (TmpOpts -> String) -> ([TmpOpts] -> ShowS) -> Show TmpOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TmpOpts -> ShowS
showsPrec :: Int -> TmpOpts -> ShowS
$cshow :: TmpOpts -> String
show :: TmpOpts -> String
$cshowList :: [TmpOpts] -> ShowS
showList :: [TmpOpts] -> ShowS
Show, Eq TmpOpts
Eq TmpOpts =>
(TmpOpts -> TmpOpts -> Ordering)
-> (TmpOpts -> TmpOpts -> Bool)
-> (TmpOpts -> TmpOpts -> Bool)
-> (TmpOpts -> TmpOpts -> Bool)
-> (TmpOpts -> TmpOpts -> Bool)
-> (TmpOpts -> TmpOpts -> TmpOpts)
-> (TmpOpts -> TmpOpts -> TmpOpts)
-> Ord TmpOpts
TmpOpts -> TmpOpts -> Bool
TmpOpts -> TmpOpts -> Ordering
TmpOpts -> TmpOpts -> TmpOpts
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 :: TmpOpts -> TmpOpts -> Ordering
compare :: TmpOpts -> TmpOpts -> Ordering
$c< :: TmpOpts -> TmpOpts -> Bool
< :: TmpOpts -> TmpOpts -> Bool
$c<= :: TmpOpts -> TmpOpts -> Bool
<= :: TmpOpts -> TmpOpts -> Bool
$c> :: TmpOpts -> TmpOpts -> Bool
> :: TmpOpts -> TmpOpts -> Bool
$c>= :: TmpOpts -> TmpOpts -> Bool
>= :: TmpOpts -> TmpOpts -> Bool
$cmax :: TmpOpts -> TmpOpts -> TmpOpts
max :: TmpOpts -> TmpOpts -> TmpOpts
$cmin :: TmpOpts -> TmpOpts -> TmpOpts
min :: TmpOpts -> TmpOpts -> TmpOpts
Ord)

instance Default TmpOpts where
  def :: TmpOpts
def = TargetPath -> TmpOpts
TmpOpts TargetPath
""

data SecretOpts
  = SecretOpts
      { SecretOpts -> Maybe TargetPath
sTarget :: !(Maybe TargetPath),
        SecretOpts -> Maybe Text
sCacheId :: !(Maybe Text),
        SecretOpts -> Maybe Bool
sIsRequired :: !(Maybe Bool),
        SecretOpts -> Maybe SourcePath
sSource :: !(Maybe SourcePath),
        SecretOpts -> Maybe Text
sMode :: !(Maybe Text),
        SecretOpts -> Maybe Text
sUid :: !(Maybe Text),
        SecretOpts -> Maybe Text
sGid :: !(Maybe Text)
      }
  deriving (SecretOpts -> SecretOpts -> Bool
(SecretOpts -> SecretOpts -> Bool)
-> (SecretOpts -> SecretOpts -> Bool) -> Eq SecretOpts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SecretOpts -> SecretOpts -> Bool
== :: SecretOpts -> SecretOpts -> Bool
$c/= :: SecretOpts -> SecretOpts -> Bool
/= :: SecretOpts -> SecretOpts -> Bool
Eq, Int -> SecretOpts -> ShowS
[SecretOpts] -> ShowS
SecretOpts -> String
(Int -> SecretOpts -> ShowS)
-> (SecretOpts -> String)
-> ([SecretOpts] -> ShowS)
-> Show SecretOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SecretOpts -> ShowS
showsPrec :: Int -> SecretOpts -> ShowS
$cshow :: SecretOpts -> String
show :: SecretOpts -> String
$cshowList :: [SecretOpts] -> ShowS
showList :: [SecretOpts] -> ShowS
Show, Eq SecretOpts
Eq SecretOpts =>
(SecretOpts -> SecretOpts -> Ordering)
-> (SecretOpts -> SecretOpts -> Bool)
-> (SecretOpts -> SecretOpts -> Bool)
-> (SecretOpts -> SecretOpts -> Bool)
-> (SecretOpts -> SecretOpts -> Bool)
-> (SecretOpts -> SecretOpts -> SecretOpts)
-> (SecretOpts -> SecretOpts -> SecretOpts)
-> Ord SecretOpts
SecretOpts -> SecretOpts -> Bool
SecretOpts -> SecretOpts -> Ordering
SecretOpts -> SecretOpts -> SecretOpts
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 :: SecretOpts -> SecretOpts -> Ordering
compare :: SecretOpts -> SecretOpts -> Ordering
$c< :: SecretOpts -> SecretOpts -> Bool
< :: SecretOpts -> SecretOpts -> Bool
$c<= :: SecretOpts -> SecretOpts -> Bool
<= :: SecretOpts -> SecretOpts -> Bool
$c> :: SecretOpts -> SecretOpts -> Bool
> :: SecretOpts -> SecretOpts -> Bool
$c>= :: SecretOpts -> SecretOpts -> Bool
>= :: SecretOpts -> SecretOpts -> Bool
$cmax :: SecretOpts -> SecretOpts -> SecretOpts
max :: SecretOpts -> SecretOpts -> SecretOpts
$cmin :: SecretOpts -> SecretOpts -> SecretOpts
min :: SecretOpts -> SecretOpts -> SecretOpts
Ord)

instance Default SecretOpts where
  def :: SecretOpts
def = Maybe TargetPath
-> Maybe Text
-> Maybe Bool
-> Maybe SourcePath
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SecretOpts
SecretOpts Maybe TargetPath
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing Maybe Bool
forall a. Maybe a
Nothing Maybe SourcePath
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing

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

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

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

data RunFlags
  = RunFlags
      { RunFlags -> Set RunMount
mount :: !(Set RunMount),
        RunFlags -> Maybe RunSecurity
security :: !(Maybe RunSecurity),
        RunFlags -> Maybe RunNetwork
network :: !(Maybe RunNetwork)
      }
  deriving (Int -> RunFlags -> ShowS
[RunFlags] -> ShowS
RunFlags -> String
(Int -> RunFlags -> ShowS)
-> (RunFlags -> String) -> ([RunFlags] -> ShowS) -> Show RunFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RunFlags -> ShowS
showsPrec :: Int -> RunFlags -> ShowS
$cshow :: RunFlags -> String
show :: RunFlags -> String
$cshowList :: [RunFlags] -> ShowS
showList :: [RunFlags] -> ShowS
Show, RunFlags -> RunFlags -> Bool
(RunFlags -> RunFlags -> Bool)
-> (RunFlags -> RunFlags -> Bool) -> Eq RunFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RunFlags -> RunFlags -> Bool
== :: RunFlags -> RunFlags -> Bool
$c/= :: RunFlags -> RunFlags -> Bool
/= :: RunFlags -> RunFlags -> Bool
Eq, Eq RunFlags
Eq RunFlags =>
(RunFlags -> RunFlags -> Ordering)
-> (RunFlags -> RunFlags -> Bool)
-> (RunFlags -> RunFlags -> Bool)
-> (RunFlags -> RunFlags -> Bool)
-> (RunFlags -> RunFlags -> Bool)
-> (RunFlags -> RunFlags -> RunFlags)
-> (RunFlags -> RunFlags -> RunFlags)
-> Ord RunFlags
RunFlags -> RunFlags -> Bool
RunFlags -> RunFlags -> Ordering
RunFlags -> RunFlags -> RunFlags
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 :: RunFlags -> RunFlags -> Ordering
compare :: RunFlags -> RunFlags -> Ordering
$c< :: RunFlags -> RunFlags -> Bool
< :: RunFlags -> RunFlags -> Bool
$c<= :: RunFlags -> RunFlags -> Bool
<= :: RunFlags -> RunFlags -> Bool
$c> :: RunFlags -> RunFlags -> Bool
> :: RunFlags -> RunFlags -> Bool
$c>= :: RunFlags -> RunFlags -> Bool
>= :: RunFlags -> RunFlags -> Bool
$cmax :: RunFlags -> RunFlags -> RunFlags
max :: RunFlags -> RunFlags -> RunFlags
$cmin :: RunFlags -> RunFlags -> RunFlags
min :: RunFlags -> RunFlags -> RunFlags
Ord)

instance Default RunFlags where
  def :: RunFlags
def = Set RunMount -> Maybe RunSecurity -> Maybe RunNetwork -> RunFlags
RunFlags Set RunMount
forall a. Monoid a => a
mempty Maybe RunSecurity
forall a. Maybe a
Nothing Maybe RunNetwork
forall a. Maybe a
Nothing

data RunArgs args = RunArgs (Arguments args) RunFlags
  deriving (Int -> RunArgs args -> ShowS
[RunArgs args] -> ShowS
RunArgs args -> String
(Int -> RunArgs args -> ShowS)
-> (RunArgs args -> String)
-> ([RunArgs args] -> ShowS)
-> Show (RunArgs args)
forall args. Show args => Int -> RunArgs args -> ShowS
forall args. Show args => [RunArgs args] -> ShowS
forall args. Show args => RunArgs args -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall args. Show args => Int -> RunArgs args -> ShowS
showsPrec :: Int -> RunArgs args -> ShowS
$cshow :: forall args. Show args => RunArgs args -> String
show :: RunArgs args -> String
$cshowList :: forall args. Show args => [RunArgs args] -> ShowS
showList :: [RunArgs args] -> ShowS
Show, RunArgs args -> RunArgs args -> Bool
(RunArgs args -> RunArgs args -> Bool)
-> (RunArgs args -> RunArgs args -> Bool) -> Eq (RunArgs args)
forall args. Eq args => RunArgs args -> RunArgs args -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall args. Eq args => RunArgs args -> RunArgs args -> Bool
== :: RunArgs args -> RunArgs args -> Bool
$c/= :: forall args. Eq args => RunArgs args -> RunArgs args -> Bool
/= :: RunArgs args -> RunArgs args -> Bool
Eq, Eq (RunArgs args)
Eq (RunArgs args) =>
(RunArgs args -> RunArgs args -> Ordering)
-> (RunArgs args -> RunArgs args -> Bool)
-> (RunArgs args -> RunArgs args -> Bool)
-> (RunArgs args -> RunArgs args -> Bool)
-> (RunArgs args -> RunArgs args -> Bool)
-> (RunArgs args -> RunArgs args -> RunArgs args)
-> (RunArgs args -> RunArgs args -> RunArgs args)
-> Ord (RunArgs args)
RunArgs args -> RunArgs args -> Bool
RunArgs args -> RunArgs args -> Ordering
RunArgs args -> RunArgs args -> RunArgs args
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
forall args. Ord args => Eq (RunArgs args)
forall args. Ord args => RunArgs args -> RunArgs args -> Bool
forall args. Ord args => RunArgs args -> RunArgs args -> Ordering
forall args.
Ord args =>
RunArgs args -> RunArgs args -> RunArgs args
$ccompare :: forall args. Ord args => RunArgs args -> RunArgs args -> Ordering
compare :: RunArgs args -> RunArgs args -> Ordering
$c< :: forall args. Ord args => RunArgs args -> RunArgs args -> Bool
< :: RunArgs args -> RunArgs args -> Bool
$c<= :: forall args. Ord args => RunArgs args -> RunArgs args -> Bool
<= :: RunArgs args -> RunArgs args -> Bool
$c> :: forall args. Ord args => RunArgs args -> RunArgs args -> Bool
> :: RunArgs args -> RunArgs args -> Bool
$c>= :: forall args. Ord args => RunArgs args -> RunArgs args -> Bool
>= :: RunArgs args -> RunArgs args -> Bool
$cmax :: forall args.
Ord args =>
RunArgs args -> RunArgs args -> RunArgs args
max :: RunArgs args -> RunArgs args -> RunArgs args
$cmin :: forall args.
Ord args =>
RunArgs args -> RunArgs args -> RunArgs args
min :: RunArgs args -> RunArgs args -> RunArgs args
Ord, (forall a b. (a -> b) -> RunArgs a -> RunArgs b)
-> (forall a b. a -> RunArgs b -> RunArgs a) -> Functor RunArgs
forall a b. a -> RunArgs b -> RunArgs a
forall a b. (a -> b) -> RunArgs a -> RunArgs b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> RunArgs a -> RunArgs b
fmap :: forall a b. (a -> b) -> RunArgs a -> RunArgs b
$c<$ :: forall a b. a -> RunArgs b -> RunArgs a
<$ :: forall a b. a -> RunArgs b -> RunArgs a
Functor)

instance IsString (RunArgs Text) where
  fromString :: String -> RunArgs Text
fromString String
s =
    Arguments Text -> RunFlags -> RunArgs Text
forall args. Arguments args -> RunFlags -> RunArgs args
RunArgs
      (Text -> Arguments Text
forall args. args -> Arguments args
ArgumentsText (Text -> Arguments Text)
-> (String -> Text) -> String -> Arguments Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack (String -> Arguments Text) -> String -> Arguments Text
forall a b. (a -> b) -> a -> b
$ String
s)
      RunFlags
        { $sel:mount:RunFlags :: Set RunMount
mount = Set RunMount
forall a. Monoid a => a
mempty,
          $sel:security:RunFlags :: Maybe RunSecurity
security = Maybe RunSecurity
forall a. Maybe a
Nothing,
          $sel:network:RunFlags :: Maybe RunNetwork
network = Maybe RunNetwork
forall a. Maybe a
Nothing
        }

newtype EscapeChar
  = EscapeChar
      { EscapeChar -> Char
escape :: Char
      }
  deriving (Int -> EscapeChar -> ShowS
[EscapeChar] -> ShowS
EscapeChar -> String
(Int -> EscapeChar -> ShowS)
-> (EscapeChar -> String)
-> ([EscapeChar] -> ShowS)
-> Show EscapeChar
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EscapeChar -> ShowS
showsPrec :: Int -> EscapeChar -> ShowS
$cshow :: EscapeChar -> String
show :: EscapeChar -> String
$cshowList :: [EscapeChar] -> ShowS
showList :: [EscapeChar] -> ShowS
Show, EscapeChar -> EscapeChar -> Bool
(EscapeChar -> EscapeChar -> Bool)
-> (EscapeChar -> EscapeChar -> Bool) -> Eq EscapeChar
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EscapeChar -> EscapeChar -> Bool
== :: EscapeChar -> EscapeChar -> Bool
$c/= :: EscapeChar -> EscapeChar -> Bool
/= :: EscapeChar -> EscapeChar -> Bool
Eq, Eq EscapeChar
Eq EscapeChar =>
(EscapeChar -> EscapeChar -> Ordering)
-> (EscapeChar -> EscapeChar -> Bool)
-> (EscapeChar -> EscapeChar -> Bool)
-> (EscapeChar -> EscapeChar -> Bool)
-> (EscapeChar -> EscapeChar -> Bool)
-> (EscapeChar -> EscapeChar -> EscapeChar)
-> (EscapeChar -> EscapeChar -> EscapeChar)
-> Ord EscapeChar
EscapeChar -> EscapeChar -> Bool
EscapeChar -> EscapeChar -> Ordering
EscapeChar -> EscapeChar -> EscapeChar
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 :: EscapeChar -> EscapeChar -> Ordering
compare :: EscapeChar -> EscapeChar -> Ordering
$c< :: EscapeChar -> EscapeChar -> Bool
< :: EscapeChar -> EscapeChar -> Bool
$c<= :: EscapeChar -> EscapeChar -> Bool
<= :: EscapeChar -> EscapeChar -> Bool
$c> :: EscapeChar -> EscapeChar -> Bool
> :: EscapeChar -> EscapeChar -> Bool
$c>= :: EscapeChar -> EscapeChar -> Bool
>= :: EscapeChar -> EscapeChar -> Bool
$cmax :: EscapeChar -> EscapeChar -> EscapeChar
max :: EscapeChar -> EscapeChar -> EscapeChar
$cmin :: EscapeChar -> EscapeChar -> EscapeChar
min :: EscapeChar -> EscapeChar -> EscapeChar
Ord)

instance IsChar EscapeChar where
  fromChar :: Char -> EscapeChar
fromChar Char
c =
    EscapeChar {$sel:escape:EscapeChar :: Char
escape = Char
c}
  toChar :: EscapeChar -> Char
toChar EscapeChar
e = EscapeChar -> Char
escape EscapeChar
e

newtype SyntaxImage
  = SyntaxImage
      { SyntaxImage -> Image
syntax :: Image
      }
  deriving (Int -> SyntaxImage -> ShowS
[SyntaxImage] -> ShowS
SyntaxImage -> String
(Int -> SyntaxImage -> ShowS)
-> (SyntaxImage -> String)
-> ([SyntaxImage] -> ShowS)
-> Show SyntaxImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SyntaxImage -> ShowS
showsPrec :: Int -> SyntaxImage -> ShowS
$cshow :: SyntaxImage -> String
show :: SyntaxImage -> String
$cshowList :: [SyntaxImage] -> ShowS
showList :: [SyntaxImage] -> ShowS
Show, SyntaxImage -> SyntaxImage -> Bool
(SyntaxImage -> SyntaxImage -> Bool)
-> (SyntaxImage -> SyntaxImage -> Bool) -> Eq SyntaxImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SyntaxImage -> SyntaxImage -> Bool
== :: SyntaxImage -> SyntaxImage -> Bool
$c/= :: SyntaxImage -> SyntaxImage -> Bool
/= :: SyntaxImage -> SyntaxImage -> Bool
Eq, Eq SyntaxImage
Eq SyntaxImage =>
(SyntaxImage -> SyntaxImage -> Ordering)
-> (SyntaxImage -> SyntaxImage -> Bool)
-> (SyntaxImage -> SyntaxImage -> Bool)
-> (SyntaxImage -> SyntaxImage -> Bool)
-> (SyntaxImage -> SyntaxImage -> Bool)
-> (SyntaxImage -> SyntaxImage -> SyntaxImage)
-> (SyntaxImage -> SyntaxImage -> SyntaxImage)
-> Ord SyntaxImage
SyntaxImage -> SyntaxImage -> Bool
SyntaxImage -> SyntaxImage -> Ordering
SyntaxImage -> SyntaxImage -> SyntaxImage
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 :: SyntaxImage -> SyntaxImage -> Ordering
compare :: SyntaxImage -> SyntaxImage -> Ordering
$c< :: SyntaxImage -> SyntaxImage -> Bool
< :: SyntaxImage -> SyntaxImage -> Bool
$c<= :: SyntaxImage -> SyntaxImage -> Bool
<= :: SyntaxImage -> SyntaxImage -> Bool
$c> :: SyntaxImage -> SyntaxImage -> Bool
> :: SyntaxImage -> SyntaxImage -> Bool
$c>= :: SyntaxImage -> SyntaxImage -> Bool
>= :: SyntaxImage -> SyntaxImage -> Bool
$cmax :: SyntaxImage -> SyntaxImage -> SyntaxImage
max :: SyntaxImage -> SyntaxImage -> SyntaxImage
$cmin :: SyntaxImage -> SyntaxImage -> SyntaxImage
min :: SyntaxImage -> SyntaxImage -> SyntaxImage
Ord)

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

-- | All commands available in Dockerfiles
data Instruction args
  = From !BaseImage
  | Add !AddArgs !AddFlags
  | User !Text
  | Label !Pairs
  | Stopsignal !Text
  | Copy !CopyArgs !CopyFlags
  | Run !(RunArgs args)
  | Cmd !(Arguments args)
  | Shell !(Arguments args)
  | Workdir !Directory
  | Expose !Ports
  | Volume !Text
  | Entrypoint !(Arguments args)
  | Maintainer !Text
  | Env !Pairs
  | Arg
      !Text
      !(Maybe Text)
  | Healthcheck !(Check args)
  | Pragma !PragmaDirective
  | Comment !Text
  | OnBuild !(Instruction args)
  deriving (Instruction args -> Instruction args -> Bool
(Instruction args -> Instruction args -> Bool)
-> (Instruction args -> Instruction args -> Bool)
-> Eq (Instruction args)
forall args.
Eq args =>
Instruction args -> Instruction args -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall args.
Eq args =>
Instruction args -> Instruction args -> Bool
== :: Instruction args -> Instruction args -> Bool
$c/= :: forall args.
Eq args =>
Instruction args -> Instruction args -> Bool
/= :: Instruction args -> Instruction args -> Bool
Eq, Eq (Instruction args)
Eq (Instruction args) =>
(Instruction args -> Instruction args -> Ordering)
-> (Instruction args -> Instruction args -> Bool)
-> (Instruction args -> Instruction args -> Bool)
-> (Instruction args -> Instruction args -> Bool)
-> (Instruction args -> Instruction args -> Bool)
-> (Instruction args -> Instruction args -> Instruction args)
-> (Instruction args -> Instruction args -> Instruction args)
-> Ord (Instruction args)
Instruction args -> Instruction args -> Bool
Instruction args -> Instruction args -> Ordering
Instruction args -> Instruction args -> Instruction args
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
forall args. Ord args => Eq (Instruction args)
forall args.
Ord args =>
Instruction args -> Instruction args -> Bool
forall args.
Ord args =>
Instruction args -> Instruction args -> Ordering
forall args.
Ord args =>
Instruction args -> Instruction args -> Instruction args
$ccompare :: forall args.
Ord args =>
Instruction args -> Instruction args -> Ordering
compare :: Instruction args -> Instruction args -> Ordering
$c< :: forall args.
Ord args =>
Instruction args -> Instruction args -> Bool
< :: Instruction args -> Instruction args -> Bool
$c<= :: forall args.
Ord args =>
Instruction args -> Instruction args -> Bool
<= :: Instruction args -> Instruction args -> Bool
$c> :: forall args.
Ord args =>
Instruction args -> Instruction args -> Bool
> :: Instruction args -> Instruction args -> Bool
$c>= :: forall args.
Ord args =>
Instruction args -> Instruction args -> Bool
>= :: Instruction args -> Instruction args -> Bool
$cmax :: forall args.
Ord args =>
Instruction args -> Instruction args -> Instruction args
max :: Instruction args -> Instruction args -> Instruction args
$cmin :: forall args.
Ord args =>
Instruction args -> Instruction args -> Instruction args
min :: Instruction args -> Instruction args -> Instruction args
Ord, Int -> Instruction args -> ShowS
[Instruction args] -> ShowS
Instruction args -> String
(Int -> Instruction args -> ShowS)
-> (Instruction args -> String)
-> ([Instruction args] -> ShowS)
-> Show (Instruction args)
forall args. Show args => Int -> Instruction args -> ShowS
forall args. Show args => [Instruction args] -> ShowS
forall args. Show args => Instruction args -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall args. Show args => Int -> Instruction args -> ShowS
showsPrec :: Int -> Instruction args -> ShowS
$cshow :: forall args. Show args => Instruction args -> String
show :: Instruction args -> String
$cshowList :: forall args. Show args => [Instruction args] -> ShowS
showList :: [Instruction args] -> ShowS
Show, (forall a b. (a -> b) -> Instruction a -> Instruction b)
-> (forall a b. a -> Instruction b -> Instruction a)
-> Functor Instruction
forall a b. a -> Instruction b -> Instruction a
forall a b. (a -> b) -> Instruction a -> Instruction b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> Instruction a -> Instruction b
fmap :: forall a b. (a -> b) -> Instruction a -> Instruction b
$c<$ :: forall a b. a -> Instruction b -> Instruction a
<$ :: forall a b. a -> Instruction b -> Instruction a
Functor)

type Filename = Text

type Linenumber = Int

-- | 'Instruction' with additional location information required for creating
-- good check messages
data InstructionPos args
  = InstructionPos
      { forall args. InstructionPos args -> Instruction args
instruction :: !(Instruction args),
        forall args. InstructionPos args -> Text
sourcename :: !Filename,
        forall args. InstructionPos args -> Int
lineNumber :: !Linenumber
      }
  deriving (InstructionPos args -> InstructionPos args -> Bool
(InstructionPos args -> InstructionPos args -> Bool)
-> (InstructionPos args -> InstructionPos args -> Bool)
-> Eq (InstructionPos args)
forall args.
Eq args =>
InstructionPos args -> InstructionPos args -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall args.
Eq args =>
InstructionPos args -> InstructionPos args -> Bool
== :: InstructionPos args -> InstructionPos args -> Bool
$c/= :: forall args.
Eq args =>
InstructionPos args -> InstructionPos args -> Bool
/= :: InstructionPos args -> InstructionPos args -> Bool
Eq, Eq (InstructionPos args)
Eq (InstructionPos args) =>
(InstructionPos args -> InstructionPos args -> Ordering)
-> (InstructionPos args -> InstructionPos args -> Bool)
-> (InstructionPos args -> InstructionPos args -> Bool)
-> (InstructionPos args -> InstructionPos args -> Bool)
-> (InstructionPos args -> InstructionPos args -> Bool)
-> (InstructionPos args
    -> InstructionPos args -> InstructionPos args)
-> (InstructionPos args
    -> InstructionPos args -> InstructionPos args)
-> Ord (InstructionPos args)
InstructionPos args -> InstructionPos args -> Bool
InstructionPos args -> InstructionPos args -> Ordering
InstructionPos args -> InstructionPos args -> InstructionPos args
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
forall args. Ord args => Eq (InstructionPos args)
forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> Bool
forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> Ordering
forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> InstructionPos args
$ccompare :: forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> Ordering
compare :: InstructionPos args -> InstructionPos args -> Ordering
$c< :: forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> Bool
< :: InstructionPos args -> InstructionPos args -> Bool
$c<= :: forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> Bool
<= :: InstructionPos args -> InstructionPos args -> Bool
$c> :: forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> Bool
> :: InstructionPos args -> InstructionPos args -> Bool
$c>= :: forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> Bool
>= :: InstructionPos args -> InstructionPos args -> Bool
$cmax :: forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> InstructionPos args
max :: InstructionPos args -> InstructionPos args -> InstructionPos args
$cmin :: forall args.
Ord args =>
InstructionPos args -> InstructionPos args -> InstructionPos args
min :: InstructionPos args -> InstructionPos args -> InstructionPos args
Ord, Int -> InstructionPos args -> ShowS
[InstructionPos args] -> ShowS
InstructionPos args -> String
(Int -> InstructionPos args -> ShowS)
-> (InstructionPos args -> String)
-> ([InstructionPos args] -> ShowS)
-> Show (InstructionPos args)
forall args. Show args => Int -> InstructionPos args -> ShowS
forall args. Show args => [InstructionPos args] -> ShowS
forall args. Show args => InstructionPos args -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall args. Show args => Int -> InstructionPos args -> ShowS
showsPrec :: Int -> InstructionPos args -> ShowS
$cshow :: forall args. Show args => InstructionPos args -> String
show :: InstructionPos args -> String
$cshowList :: forall args. Show args => [InstructionPos args] -> ShowS
showList :: [InstructionPos args] -> ShowS
Show, (forall a b. (a -> b) -> InstructionPos a -> InstructionPos b)
-> (forall a b. a -> InstructionPos b -> InstructionPos a)
-> Functor InstructionPos
forall a b. a -> InstructionPos b -> InstructionPos a
forall a b. (a -> b) -> InstructionPos a -> InstructionPos b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> InstructionPos a -> InstructionPos b
fmap :: forall a b. (a -> b) -> InstructionPos a -> InstructionPos b
$c<$ :: forall a b. a -> InstructionPos b -> InstructionPos a
<$ :: forall a b. a -> InstructionPos b -> InstructionPos a
Functor)

defaultEsc :: Char
defaultEsc :: Char
defaultEsc = Char
'\\'