module Memfd.CreateFlagsType where import Data.Bits ((.|.)) import Data.Monoid (Monoid (..)) import Data.Semigroup (Semigroup (..)) import Foreign.C.Types (CUInt (..)) newtype CreateFlags = CreateFlags CUInt instance Semigroup CreateFlags where CreateFlags CUInt x <> :: CreateFlags -> CreateFlags -> CreateFlags <> CreateFlags CUInt y = CUInt -> CreateFlags CreateFlags (CUInt x forall a. Bits a => a -> a -> a .|. CUInt y) instance Monoid CreateFlags where mempty :: CreateFlags mempty = CUInt -> CreateFlags CreateFlags CUInt 0