    {-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
    module Debian.Arch
        ( Arch(..)
        , ArchOS(..)
        , ArchCPU(..)
        , prettyArch
        , parseArch
        ) where

    import Data.Data (Data)
    import Data.Typeable (Typeable)
    import Text.PrettyPrint (Doc, text)

    data ArchOS = ArchOS String | ArchOSAny deriving (ArchOS -> ArchOS -> Bool
    (ArchOS -> ArchOS -> Bool)
    -> (ArchOS -> ArchOS -> Bool) -> Eq ArchOS
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ArchOS -> ArchOS -> Bool
    == :: ArchOS -> ArchOS -> Bool
    $c/= :: ArchOS -> ArchOS -> Bool
    /= :: ArchOS -> ArchOS -> Bool
    Eq, Eq ArchOS
    Eq ArchOS =>
    (ArchOS -> ArchOS -> Ordering)
    -> (ArchOS -> ArchOS -> Bool)
    -> (ArchOS -> ArchOS -> Bool)
    -> (ArchOS -> ArchOS -> Bool)
    -> (ArchOS -> ArchOS -> Bool)
    -> (ArchOS -> ArchOS -> ArchOS)
    -> (ArchOS -> ArchOS -> ArchOS)
    -> Ord ArchOS
    ArchOS -> ArchOS -> Bool
    ArchOS -> ArchOS -> Ordering
    ArchOS -> ArchOS -> ArchOS
    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 :: ArchOS -> ArchOS -> Ordering
    compare :: ArchOS -> ArchOS -> Ordering
    $c< :: ArchOS -> ArchOS -> Bool
    < :: ArchOS -> ArchOS -> Bool
    $c<= :: ArchOS -> ArchOS -> Bool
    <= :: ArchOS -> ArchOS -> Bool
    $c> :: ArchOS -> ArchOS -> Bool
    > :: ArchOS -> ArchOS -> Bool
    $c>= :: ArchOS -> ArchOS -> Bool
    >= :: ArchOS -> ArchOS -> Bool
    $cmax :: ArchOS -> ArchOS -> ArchOS
    max :: ArchOS -> ArchOS -> ArchOS
    $cmin :: ArchOS -> ArchOS -> ArchOS
    min :: ArchOS -> ArchOS -> ArchOS
    Ord, ReadPrec [ArchOS]
    ReadPrec ArchOS
    Int -> ReadS ArchOS
    ReadS [ArchOS]
    (Int -> ReadS ArchOS)
    -> ReadS [ArchOS]
    -> ReadPrec ArchOS
    -> ReadPrec [ArchOS]
    -> Read ArchOS
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS ArchOS
    readsPrec :: Int -> ReadS ArchOS
    $creadList :: ReadS [ArchOS]
    readList :: ReadS [ArchOS]
    $creadPrec :: ReadPrec ArchOS
    readPrec :: ReadPrec ArchOS
    $creadListPrec :: ReadPrec [ArchOS]
    readListPrec :: ReadPrec [ArchOS]
    Read, Int -> ArchOS -> ShowS
    [ArchOS] -> ShowS
    ArchOS -> String
    (Int -> ArchOS -> ShowS)
    -> (ArchOS -> String) -> ([ArchOS] -> ShowS) -> Show ArchOS
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ArchOS -> ShowS
    showsPrec :: Int -> ArchOS -> ShowS
    $cshow :: ArchOS -> String
    show :: ArchOS -> String
    $cshowList :: [ArchOS] -> ShowS
    showList :: [ArchOS] -> ShowS
    Show, Typeable ArchOS
    Typeable ArchOS =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> ArchOS -> c ArchOS)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c ArchOS)
    -> (ArchOS -> Constr)
    -> (ArchOS -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c ArchOS))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchOS))
    -> ((forall b. Data b => b -> b) -> ArchOS -> ArchOS)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> ArchOS -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> ArchOS -> r)
    -> (forall u. (forall d. Data d => d -> u) -> ArchOS -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> ArchOS -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS)
    -> Data ArchOS
    ArchOS -> Constr
    ArchOS -> DataType
    (forall b. Data b => b -> b) -> ArchOS -> ArchOS
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> ArchOS -> u
    forall u. (forall d. Data d => d -> u) -> ArchOS -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArchOS -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArchOS -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ArchOS
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ArchOS -> c ArchOS
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ArchOS)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchOS)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ArchOS -> c ArchOS
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ArchOS -> c ArchOS
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ArchOS
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ArchOS
    $ctoConstr :: ArchOS -> Constr
    toConstr :: ArchOS -> Constr
    $cdataTypeOf :: ArchOS -> DataType
    dataTypeOf :: ArchOS -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ArchOS)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ArchOS)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchOS)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchOS)
    $cgmapT :: (forall b. Data b => b -> b) -> ArchOS -> ArchOS
    gmapT :: (forall b. Data b => b -> b) -> ArchOS -> ArchOS
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArchOS -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArchOS -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArchOS -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArchOS -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> ArchOS -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> ArchOS -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ArchOS -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ArchOS -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS
    Data, Typeable)

    prettyOS :: ArchOS -> Doc
    prettyOS :: ArchOS -> Doc
    prettyOS (ArchOS String
    s) = String -> Doc
    text String
    s
    prettyOS ArchOS
    ArchOSAny = String -> Doc
    text String
    "any"

    parseOS :: String -> ArchOS
    parseOS :: String -> ArchOS
    parseOS String
    "any" = ArchOS
    ArchOSAny
    parseOS String
    s = String -> ArchOS
    ArchOS String
    s

    data ArchCPU = ArchCPU String | ArchCPUAny deriving (ArchCPU -> ArchCPU -> Bool
    (ArchCPU -> ArchCPU -> Bool)
    -> (ArchCPU -> ArchCPU -> Bool) -> Eq ArchCPU
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ArchCPU -> ArchCPU -> Bool
    == :: ArchCPU -> ArchCPU -> Bool
    $c/= :: ArchCPU -> ArchCPU -> Bool
    /= :: ArchCPU -> ArchCPU -> Bool
    Eq, Eq ArchCPU
    Eq ArchCPU =>
    (ArchCPU -> ArchCPU -> Ordering)
    -> (ArchCPU -> ArchCPU -> Bool)
    -> (ArchCPU -> ArchCPU -> Bool)
    -> (ArchCPU -> ArchCPU -> Bool)
    -> (ArchCPU -> ArchCPU -> Bool)
    -> (ArchCPU -> ArchCPU -> ArchCPU)
    -> (ArchCPU -> ArchCPU -> ArchCPU)
    -> Ord ArchCPU
    ArchCPU -> ArchCPU -> Bool
    ArchCPU -> ArchCPU -> Ordering
    ArchCPU -> ArchCPU -> ArchCPU
    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 :: ArchCPU -> ArchCPU -> Ordering
    compare :: ArchCPU -> ArchCPU -> Ordering
    $c< :: ArchCPU -> ArchCPU -> Bool
    < :: ArchCPU -> ArchCPU -> Bool
    $c<= :: ArchCPU -> ArchCPU -> Bool
    <= :: ArchCPU -> ArchCPU -> Bool
    $c> :: ArchCPU -> ArchCPU -> Bool
    > :: ArchCPU -> ArchCPU -> Bool
    $c>= :: ArchCPU -> ArchCPU -> Bool
    >= :: ArchCPU -> ArchCPU -> Bool
    $cmax :: ArchCPU -> ArchCPU -> ArchCPU
    max :: ArchCPU -> ArchCPU -> ArchCPU
    $cmin :: ArchCPU -> ArchCPU -> ArchCPU
    min :: ArchCPU -> ArchCPU -> ArchCPU
    Ord, ReadPrec [ArchCPU]
    ReadPrec ArchCPU
    Int -> ReadS ArchCPU
    ReadS [ArchCPU]
    (Int -> ReadS ArchCPU)
    -> ReadS [ArchCPU]
    -> ReadPrec ArchCPU
    -> ReadPrec [ArchCPU]
    -> Read ArchCPU
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS ArchCPU
    readsPrec :: Int -> ReadS ArchCPU
    $creadList :: ReadS [ArchCPU]
    readList :: ReadS [ArchCPU]
    $creadPrec :: ReadPrec ArchCPU
    readPrec :: ReadPrec ArchCPU
    $creadListPrec :: ReadPrec [ArchCPU]
    readListPrec :: ReadPrec [ArchCPU]
    Read, Int -> ArchCPU -> ShowS
    [ArchCPU] -> ShowS
    ArchCPU -> String
    (Int -> ArchCPU -> ShowS)
    -> (ArchCPU -> String) -> ([ArchCPU] -> ShowS) -> Show ArchCPU
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ArchCPU -> ShowS
    showsPrec :: Int -> ArchCPU -> ShowS
    $cshow :: ArchCPU -> String
    show :: ArchCPU -> String
    $cshowList :: [ArchCPU] -> ShowS
    showList :: [ArchCPU] -> ShowS
    Show, Typeable ArchCPU
    Typeable ArchCPU =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> ArchCPU -> c ArchCPU)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c ArchCPU)
    -> (ArchCPU -> Constr)
    -> (ArchCPU -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c ArchCPU))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchCPU))
    -> ((forall b. Data b => b -> b) -> ArchCPU -> ArchCPU)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r)
    -> (forall u. (forall d. Data d => d -> u) -> ArchCPU -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> ArchCPU -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU)
    -> Data ArchCPU
    ArchCPU -> Constr
    ArchCPU -> DataType
    (forall b. Data b => b -> b) -> ArchCPU -> ArchCPU
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> ArchCPU -> u
    forall u. (forall d. Data d => d -> u) -> ArchCPU -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ArchCPU
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ArchCPU -> c ArchCPU
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ArchCPU)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchCPU)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ArchCPU -> c ArchCPU
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ArchCPU -> c ArchCPU
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ArchCPU
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ArchCPU
    $ctoConstr :: ArchCPU -> Constr
    toConstr :: ArchCPU -> Constr
    $cdataTypeOf :: ArchCPU -> DataType
    dataTypeOf :: ArchCPU -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ArchCPU)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ArchCPU)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchCPU)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchCPU)
    $cgmapT :: (forall b. Data b => b -> b) -> ArchCPU -> ArchCPU
    gmapT :: (forall b. Data b => b -> b) -> ArchCPU -> ArchCPU
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> ArchCPU -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> ArchCPU -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ArchCPU -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ArchCPU -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU
    Data, Typeable)

    prettyCPU :: ArchCPU -> Doc
    prettyCPU :: ArchCPU -> Doc
    prettyCPU (ArchCPU String
    s) = String -> Doc
    text String
    s
    prettyCPU ArchCPU
    ArchCPUAny = String -> Doc
    text String
    "any"

    parseCPU :: String -> ArchCPU
    parseCPU :: String -> ArchCPU
    parseCPU String
    "any" = ArchCPU
    ArchCPUAny
    parseCPU String
    s = String -> ArchCPU
    ArchCPU String
    s

    data Arch
        = Source
        | All
        | Binary ArchOS ArchCPU
        deriving (Arch -> Arch -> Bool
    (Arch -> Arch -> Bool) -> (Arch -> Arch -> Bool) -> Eq Arch
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Arch -> Arch -> Bool
    == :: Arch -> Arch -> Bool
    $c/= :: Arch -> Arch -> Bool
    /= :: Arch -> Arch -> Bool
    Eq, Eq Arch
    Eq Arch =>
    (Arch -> Arch -> Ordering)
    -> (Arch -> Arch -> Bool)
    -> (Arch -> Arch -> Bool)
    -> (Arch -> Arch -> Bool)
    -> (Arch -> Arch -> Bool)
    -> (Arch -> Arch -> Arch)
    -> (Arch -> Arch -> Arch)
    -> Ord Arch
    Arch -> Arch -> Bool
    Arch -> Arch -> Ordering
    Arch -> Arch -> Arch
    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 :: Arch -> Arch -> Ordering
    compare :: Arch -> Arch -> Ordering
    $c< :: Arch -> Arch -> Bool
    < :: Arch -> Arch -> Bool
    $c<= :: Arch -> Arch -> Bool
    <= :: Arch -> Arch -> Bool
    $c> :: Arch -> Arch -> Bool
    > :: Arch -> Arch -> Bool
    $c>= :: Arch -> Arch -> Bool
    >= :: Arch -> Arch -> Bool
    $cmax :: Arch -> Arch -> Arch
    max :: Arch -> Arch -> Arch
    $cmin :: Arch -> Arch -> Arch
    min :: Arch -> Arch -> Arch
    Ord, ReadPrec [Arch]
    ReadPrec Arch
    Int -> ReadS Arch
    ReadS [Arch]
    (Int -> ReadS Arch)
    -> ReadS [Arch] -> ReadPrec Arch -> ReadPrec [Arch] -> Read Arch
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS Arch
    readsPrec :: Int -> ReadS Arch
    $creadList :: ReadS [Arch]
    readList :: ReadS [Arch]
    $creadPrec :: ReadPrec Arch
    readPrec :: ReadPrec Arch
    $creadListPrec :: ReadPrec [Arch]
    readListPrec :: ReadPrec [Arch]
    Read, Int -> Arch -> ShowS
    [Arch] -> ShowS
    Arch -> String
    (Int -> Arch -> ShowS)
    -> (Arch -> String) -> ([Arch] -> ShowS) -> Show Arch
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Arch -> ShowS
    showsPrec :: Int -> Arch -> ShowS
    $cshow :: Arch -> String
    show :: Arch -> String
    $cshowList :: [Arch] -> ShowS
    showList :: [Arch] -> ShowS
    Show, Typeable Arch
    Typeable Arch =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Arch -> c Arch)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Arch)
    -> (Arch -> Constr)
    -> (Arch -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Arch))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Arch))
    -> ((forall b. Data b => b -> b) -> Arch -> Arch)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Arch -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Arch -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Arch -> m Arch)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Arch -> m Arch)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Arch -> m Arch)
    -> Data Arch
    Arch -> Constr
    Arch -> DataType
    (forall b. Data b => b -> b) -> Arch -> Arch
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Arch -> u
    forall u. (forall d. Data d => d -> u) -> Arch -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Arch -> m Arch
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Arch -> m Arch
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Arch
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Arch -> c Arch
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Arch)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Arch)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Arch -> c Arch
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Arch -> c Arch
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Arch
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Arch
    $ctoConstr :: Arch -> Constr
    toConstr :: Arch -> Constr
    $cdataTypeOf :: Arch -> DataType
    dataTypeOf :: Arch -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Arch)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Arch)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Arch)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Arch)
    $cgmapT :: (forall b. Data b => b -> b) -> Arch -> Arch
    gmapT :: (forall b. Data b => b -> b) -> Arch -> Arch
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Arch -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Arch -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Arch -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Arch -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Arch -> m Arch
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Arch -> m Arch
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Arch -> m Arch
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Arch -> m Arch
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Arch -> m Arch
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Arch -> m Arch
    Data, Typeable)

    prettyArch :: Arch -> Doc
    prettyArch :: Arch -> Doc
    prettyArch Arch
    Source = String -> Doc
    text String
    "source"
    prettyArch Arch
    All = String -> Doc
    text String
    "all"
    prettyArch (Binary (ArchOS String
    "linux") ArchCPU
    cpu) = ArchCPU -> Doc
    prettyCPU ArchCPU
    cpu
    prettyArch (Binary ArchOS
    os ArchCPU
    cpu) = ArchOS -> Doc
    prettyOS ArchOS
    os Doc -> Doc -> Doc
    forall a. Semigroup a => a -> a -> a
    <> String -> Doc
    text String
    "-" Doc -> Doc -> Doc
    forall a. Semigroup a => a -> a -> a
    <> ArchCPU -> Doc
    prettyCPU ArchCPU
    cpu

    parseArch :: String -> Arch
    parseArch :: String -> Arch
    parseArch String
    s =
        case (Char -> Bool) -> String -> (String, String)
    forall a. (a -> Bool) -> [a] -> ([a], [a])
    span (Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    /= Char
    '-') String
    s of
          (String
    "source", String
    "") -> Arch
    Source
          (String
    "all", String
    "") -> Arch
    All
          (String
    cpu, String
    "") -> ArchOS -> ArchCPU -> Arch
    Binary (String -> ArchOS
    ArchOS String
    "linux") (String -> ArchCPU
    parseCPU String
    cpu)
          (String
    os, Char
    '-' : String
    cpu) -> ArchOS -> ArchCPU -> Arch
    Binary (String -> ArchOS
    parseOS String
    os) (String -> ArchCPU
    parseCPU String
    cpu)
          (String, String)
    _ -> String -> Arch
    forall a. HasCallStack => String -> a
    error String
    "parseArch: internal error"