module Propellor.Types.OS (
System(..),
Distribution(..),
DebianSuite(..),
isStable,
Release,
Architecture,
HostName,
UserName,
User(..),
Group(..),
userGroup,
Port(..),
) where
import Network.BSD (HostName)
import Data.Typeable
data System = System Distribution Architecture
deriving (Show, Eq, Typeable)
data Distribution
= Debian DebianSuite
| Buntish Release
deriving (Show, Eq)
data DebianSuite = Experimental | Unstable | Testing | Stable Release
deriving (Show, Eq)
isStable :: DebianSuite -> Bool
isStable (Stable _) = True
isStable _ = False
type Release = String
type Architecture = String
type UserName = String
newtype User = User UserName
deriving (Eq, Ord, Show)
newtype Group = Group String
deriving (Eq, Ord, Show)
userGroup :: User -> Group
userGroup (User u) = Group u
newtype Port = Port Int
deriving (Eq, Show)