ganeti

Safe HaskellSafe-Infered

Ganeti.ConstantUtils

Contents

Description

ConstantUtils contains the helper functions for constants

This module cannot be merged with Utils because it would create a circular dependency if imported, for example, from Constants.

Synopsis

Documentation

newtype PythonChar Source

PythonChar wraps a Python char

Constructors

PythonChar 

Fields

unPythonChar :: Char
 

Instances

data PythonNone Source

PythonNone wraps Python None

Constructors

PythonNone 

Instances

newtype FrozenSet a Source

FrozenSet wraps a Haskell Set

See PyValue instance for FrozenSet.

Constructors

FrozenSet 

Fields

unFrozenSet :: Set a
 

Instances

Eq a => Eq (FrozenSet a) 
Ord a => Ord (FrozenSet a) 
Show a => Show (FrozenSet a) 
Ord a => Monoid (FrozenSet a) 
PyValue a => PyValue (FrozenSet a)

Converts a Haskell Set into a Python frozenset

This instance was supposed to be for Set instead of FrozenSet. However, 'ghc-6.12.1' seems to be crashing with 'segmentation fault' due to the presence of more than one instance of Set, namely, this one and the one in OpCodes. For this reason, we wrap Set into FrozenSet.

mkSet :: Ord a => [a] -> FrozenSet aSource

union :: Ord a => FrozenSet a -> FrozenSet a -> FrozenSet aSource

data Protocol Source

Protocol represents the protocols used by the daemons

Constructors

Tcp 
Udp 

Instances

Show Protocol 
PyValue Protocol

PyValue instance of Protocol

This instance is used by the Haskell to Python constants

exitFailure :: IntSource

Failure exit code

These are defined here and not in Constants together with the other exit codes in order to avoid a circular dependency between Constants and Runtime

devConsole :: StringSource

Console device

This is defined here and not in Constants order to avoid a circular dependency between Constants and Logging

randomUuidFile :: StringSource

Random uuid generator

This is defined here and not in Constants order to avoid a circular dependendy between Constants and Types

Priority levels

buildVersion :: Int -> Int -> Int -> IntSource

Calculates int version number from major, minor and revision numbers.

confdProtocolVersion :: IntSource

Confd protocol version

This is defined here in order to avoid a circular dependency between Types and Constants.

Confd request query fields

ISpec

ispecsStd :: StringSource