    {-# LANGUAGE LambdaCase #-}

    module Distribution.Simple.BuildWay where

    data BuildWay = StaticWay | DynWay | ProfWay | ProfDynWay
      deriving (BuildWay -> BuildWay -> Bool
    (BuildWay -> BuildWay -> Bool)
    -> (BuildWay -> BuildWay -> Bool) -> Eq BuildWay
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: BuildWay -> BuildWay -> Bool
    == :: BuildWay -> BuildWay -> Bool
    $c/= :: BuildWay -> BuildWay -> Bool
    /= :: BuildWay -> BuildWay -> Bool
    Eq, Eq BuildWay
    Eq BuildWay =>
    (BuildWay -> BuildWay -> Ordering)
    -> (BuildWay -> BuildWay -> Bool)
    -> (BuildWay -> BuildWay -> Bool)
    -> (BuildWay -> BuildWay -> Bool)
    -> (BuildWay -> BuildWay -> Bool)
    -> (BuildWay -> BuildWay -> BuildWay)
    -> (BuildWay -> BuildWay -> BuildWay)
    -> Ord BuildWay
    BuildWay -> BuildWay -> Bool
    BuildWay -> BuildWay -> Ordering
    BuildWay -> BuildWay -> BuildWay
    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 :: BuildWay -> BuildWay -> Ordering
    compare :: BuildWay -> BuildWay -> Ordering
    $c< :: BuildWay -> BuildWay -> Bool
    < :: BuildWay -> BuildWay -> Bool
    $c<= :: BuildWay -> BuildWay -> Bool
    <= :: BuildWay -> BuildWay -> Bool
    $c> :: BuildWay -> BuildWay -> Bool
    > :: BuildWay -> BuildWay -> Bool
    $c>= :: BuildWay -> BuildWay -> Bool
    >= :: BuildWay -> BuildWay -> Bool
    $cmax :: BuildWay -> BuildWay -> BuildWay
    max :: BuildWay -> BuildWay -> BuildWay
    $cmin :: BuildWay -> BuildWay -> BuildWay
    min :: BuildWay -> BuildWay -> BuildWay
    Ord, Int -> BuildWay -> ShowS
    [BuildWay] -> ShowS
    BuildWay -> String
    (Int -> BuildWay -> ShowS)
    -> (BuildWay -> String) -> ([BuildWay] -> ShowS) -> Show BuildWay
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> BuildWay -> ShowS
    showsPrec :: Int -> BuildWay -> ShowS
    $cshow :: BuildWay -> String
    show :: BuildWay -> String
    $cshowList :: [BuildWay] -> ShowS
    showList :: [BuildWay] -> ShowS
    Show, ReadPrec [BuildWay]
    ReadPrec BuildWay
    Int -> ReadS BuildWay
    ReadS [BuildWay]
    (Int -> ReadS BuildWay)
    -> ReadS [BuildWay]
    -> ReadPrec BuildWay
    -> ReadPrec [BuildWay]
    -> Read BuildWay
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS BuildWay
    readsPrec :: Int -> ReadS BuildWay
    $creadList :: ReadS [BuildWay]
    readList :: ReadS [BuildWay]
    $creadPrec :: ReadPrec BuildWay
    readPrec :: ReadPrec BuildWay
    $creadListPrec :: ReadPrec [BuildWay]
    readListPrec :: ReadPrec [BuildWay]
    Read, Int -> BuildWay
    BuildWay -> Int
    BuildWay -> [BuildWay]
    BuildWay -> BuildWay
    BuildWay -> BuildWay -> [BuildWay]
    BuildWay -> BuildWay -> BuildWay -> [BuildWay]
    (BuildWay -> BuildWay)
    -> (BuildWay -> BuildWay)
    -> (Int -> BuildWay)
    -> (BuildWay -> Int)
    -> (BuildWay -> [BuildWay])
    -> (BuildWay -> BuildWay -> [BuildWay])
    -> (BuildWay -> BuildWay -> [BuildWay])
    -> (BuildWay -> BuildWay -> BuildWay -> [BuildWay])
    -> Enum BuildWay
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: BuildWay -> BuildWay
    succ :: BuildWay -> BuildWay
    $cpred :: BuildWay -> BuildWay
    pred :: BuildWay -> BuildWay
    $ctoEnum :: Int -> BuildWay
    toEnum :: Int -> BuildWay
    $cfromEnum :: BuildWay -> Int
    fromEnum :: BuildWay -> Int
    $cenumFrom :: BuildWay -> [BuildWay]
    enumFrom :: BuildWay -> [BuildWay]
    $cenumFromThen :: BuildWay -> BuildWay -> [BuildWay]
    enumFromThen :: BuildWay -> BuildWay -> [BuildWay]
    $cenumFromTo :: BuildWay -> BuildWay -> [BuildWay]
    enumFromTo :: BuildWay -> BuildWay -> [BuildWay]
    $cenumFromThenTo :: BuildWay -> BuildWay -> BuildWay -> [BuildWay]
    enumFromThenTo :: BuildWay -> BuildWay -> BuildWay -> [BuildWay]
    Enum)

    -- | Returns the object/interface extension prefix for the given build way (e.g. "dyn_" for 'DynWay')
    buildWayPrefix :: BuildWay -> String
    buildWayPrefix :: BuildWay -> String
    buildWayPrefix = \case
      BuildWay
    StaticWay -> String
    ""
      BuildWay
    ProfWay -> String
    "p_"
      BuildWay
    DynWay -> String
    "dyn_"
      BuildWay
    ProfDynWay -> String
    "p_dyn_"