Safe Haskell | None |
---|---|
Language | Haskell98 |
- data ObjectPath = ObjectPath {
- opAbsolute :: Bool
- opParts :: [Text]
- newtype Signature = Signature {
- fromSignature :: [DBusType]
- objectPath :: Text -> ObjectPath
- objectPathToText :: ObjectPath -> Text
- stripObjectPrefix :: ObjectPath -> ObjectPath -> Maybe ObjectPath
- isPathPrefix :: ObjectPath -> ObjectPath -> Bool
- isRoot :: ObjectPath -> Bool
- isEmpty :: ObjectPath -> Bool
- data DBusSimpleType
- ppSimpleType :: DBusSimpleType -> String
- data DBusType
- ppType :: DBusType -> String
- data Parity
- type family ArgsOf x :: Parity
- data MethodDescription parity where
- (:->) :: Text -> MethodDescription n -> MethodDescription (Arg n)
- Result :: Text -> MethodDescription Null
- type TypeByteSym0 = TypeByte
- type TypeBooleanSym0 = TypeBoolean
- type TypeInt16Sym0 = TypeInt16
- type TypeUInt16Sym0 = TypeUInt16
- type TypeInt32Sym0 = TypeInt32
- type TypeUInt32Sym0 = TypeUInt32
- type TypeInt64Sym0 = TypeInt64
- type TypeUInt64Sym0 = TypeUInt64
- type TypeDoubleSym0 = TypeDouble
- type TypeUnixFDSym0 = TypeUnixFD
- type TypeStringSym0 = TypeString
- type TypeObjectPathSym0 = TypeObjectPath
- type TypeSignatureSym0 = TypeSignature
- type SDBusSimpleType z = Sing z
- type DBusSimpleTypeSym1 t = DBusSimpleType t
- data DBusSimpleTypeSym0 l = forall arg . (~) (KindOf (Apply DBusSimpleTypeSym0 arg)) (KindOf (DBusSimpleTypeSym1 arg)) => DBusSimpleTypeSym0KindInference
- type TypeArraySym1 t = TypeArray t
- data TypeArraySym0 l = forall arg . (~) (KindOf (Apply TypeArraySym0 arg)) (KindOf (TypeArraySym1 arg)) => TypeArraySym0KindInference
- type TypeStructSym1 t = TypeStruct t
- data TypeStructSym0 l = forall arg . (~) (KindOf (Apply TypeStructSym0 arg)) (KindOf (TypeStructSym1 arg)) => TypeStructSym0KindInference
- type TypeDictSym2 t t = TypeDict t t
- data TypeDictSym1 l l = forall arg . (~) (KindOf (Apply (TypeDictSym1 l) arg)) (KindOf (TypeDictSym2 l arg)) => TypeDictSym1KindInference
- data TypeDictSym0 l = forall arg . (~) (KindOf (Apply TypeDictSym0 arg)) (KindOf (TypeDictSym1 arg)) => TypeDictSym0KindInference
- type TypeVariantSym0 = TypeVariant
- type TypeDictEntrySym2 t t = TypeDictEntry t t
- data TypeDictEntrySym1 l l = forall arg . (~) (KindOf (Apply (TypeDictEntrySym1 l) arg)) (KindOf (TypeDictEntrySym2 l arg)) => TypeDictEntrySym1KindInference
- data TypeDictEntrySym0 l = forall arg . (~) (KindOf (Apply TypeDictEntrySym0 arg)) (KindOf (TypeDictEntrySym1 arg)) => TypeDictEntrySym0KindInference
- type TypeUnitSym0 = TypeUnit
- type SDBusType z = Sing z
- type NullSym0 = Null
- type ArgSym1 t = Arg t
- data ArgSym0 l = forall arg . (~) (KindOf (Apply ArgSym0 arg)) (KindOf (ArgSym1 arg)) => ArgSym0KindInference
- type SParity z = Sing z
- type family Equals_1627481944 a b :: Bool
- type family Equals_1627481902 a b :: Bool
- type family Equals_1627481895 a b :: Bool
- data DBusStruct :: [DBusType] -> * where
- StructSingleton :: DBusValue a -> DBusStruct `[a]`
- StructCons :: DBusValue a -> DBusStruct as -> DBusStruct (a : as)
- data SomeDBusStruct where
- SDBS :: SingI ts => DBusStruct ts -> SomeDBusStruct
- showStruct :: Sing a -> DBusStruct a -> String
- data DBusValue :: DBusType -> * where
- DBVByte :: Word8 -> DBusValue (DBusSimpleType TypeByte)
- DBVBool :: Bool -> DBusValue (DBusSimpleType TypeBoolean)
- DBVInt16 :: Int16 -> DBusValue (DBusSimpleType TypeInt16)
- DBVUInt16 :: Word16 -> DBusValue (DBusSimpleType TypeUInt16)
- DBVInt32 :: Int32 -> DBusValue (DBusSimpleType TypeInt32)
- DBVUInt32 :: Word32 -> DBusValue (DBusSimpleType TypeUInt32)
- DBVInt64 :: Int64 -> DBusValue (DBusSimpleType TypeInt64)
- DBVUInt64 :: Word64 -> DBusValue (DBusSimpleType TypeUInt64)
- DBVDouble :: Double -> DBusValue (DBusSimpleType TypeDouble)
- DBVUnixFD :: Word32 -> DBusValue (DBusSimpleType TypeUnixFD)
- DBVString :: Text -> DBusValue (DBusSimpleType TypeString)
- DBVObjectPath :: ObjectPath -> DBusValue (DBusSimpleType TypeObjectPath)
- DBVSignature :: [DBusType] -> DBusValue (DBusSimpleType TypeSignature)
- DBVVariant :: SingI t => DBusValue t -> DBusValue TypeVariant
- DBVArray :: [DBusValue a] -> DBusValue (TypeArray a)
- DBVByteArray :: ByteString -> DBusValue (TypeArray (DBusSimpleType TypeByte))
- DBVStruct :: DBusStruct ts -> DBusValue (TypeStruct ts)
- DBVDict :: [(DBusValue (DBusSimpleType k), DBusValue v)] -> DBusValue (TypeDict k v)
- DBVUnit :: DBusValue TypeUnit
- castDBV :: (SingI s, SingI t) => DBusValue s -> Maybe (DBusValue t)
- data SomeDBusValue where
- DBV :: SingI t => DBusValue t -> SomeDBusValue
- dbusValue :: SingI t => SomeDBusValue -> Maybe (DBusValue t)
- dbusSValue :: SingI t => SomeDBusValue -> Maybe (DBusValue (DBusSimpleType t))
- fromVariant :: SingI t => DBusValue TypeVariant -> Maybe (DBusValue t)
- typeOf :: SingI t => DBusValue t -> DBusType
- class Representable a where
- data MethodWrapper av rv where
- MReturn :: SingI t => IO (DBusValue t) -> MethodWrapper [] t
- MAsk :: SingI t => (DBusValue t -> MethodWrapper avs rv) -> MethodWrapper (t : avs) rv
- type family ArgParity x :: Parity
- data Method where
- Method :: (SingI avs, SingI t) => MethodWrapper avs t -> Text -> MethodDescription (ArgParity avs) -> Method
- data Annotation = Annotation {}
- data Interface = Interface {}
- data Object = Object {}
- data MsgError = MsgError {}
- data Connection = Connection {
- primConnection :: ()
- answerSlots :: TVar (Map Word32 (TMVar (Either MsgError SomeDBusValue)))
- mainLoop :: ThreadId
- data MethodError
- type Serial = Word32
- type Slot = Either [SomeDBusValue] SomeDBusValue -> STM ()
- type AnswerSlots = Map Serial Slot
- data DBusConnection = DBusConnection {
- dBusCreateSerial :: STM Serial
- dBusAnswerSlots :: TVar AnswerSlots
- dBusWriteLock :: TMVar (Builder -> IO ())
- dBusConnectionName :: Text
- connectionAliveRef :: TVar Bool
Documentation
data ObjectPath Source
ObjectPath | |
|
objectPath :: Text -> ObjectPath Source
Parse an object path. Contrary to the standard, empty path parts are ignored
objectPathToText :: ObjectPath -> Text Source
isPathPrefix :: ObjectPath -> ObjectPath -> Bool Source
isRoot :: ObjectPath -> Bool Source
isEmpty :: ObjectPath -> Bool Source
data DBusSimpleType Source
TypeByte | |
TypeBoolean | |
TypeInt16 | |
TypeUInt16 | |
TypeInt32 | |
TypeUInt32 | |
TypeInt64 | |
TypeUInt64 | |
TypeDouble | |
TypeUnixFD | |
TypeString | |
TypeObjectPath | |
TypeSignature |
DBusSimpleType DBusSimpleType | |
TypeArray DBusType | |
TypeStruct [DBusType] | |
TypeDict DBusSimpleType DBusType | |
TypeVariant | |
TypeDictEntry DBusSimpleType DBusType | |
TypeUnit |
Eq Parity | |
Data Parity | |
Show Parity | |
Typeable * Parity | |
SingI Parity Null | |
SEq Parity (KProxy Parity) | |
PEq Parity (KProxy Parity) | |
SingI Parity n0 => SingI Parity (Arg n) | |
SingKind Parity (KProxy Parity) | |
SuppressUnusedWarnings (TyFun Parity Parity -> *) ArgSym0 | |
data Sing Parity where | |
type (:==) Parity a0 b0 = Equals_1627481944 a0 b0 | |
type Apply Parity Parity ArgSym0 l0 = ArgSym1 l0 | |
type DemoteRep Parity (KProxy Parity) = Parity |
data MethodDescription parity where Source
(:->) :: Text -> MethodDescription n -> MethodDescription (Arg n) infixr 0 | |
Result :: Text -> MethodDescription Null |
type TypeByteSym0 = TypeByte Source
type TypeBooleanSym0 = TypeBoolean Source
type TypeInt16Sym0 = TypeInt16 Source
type TypeUInt16Sym0 = TypeUInt16 Source
type TypeInt32Sym0 = TypeInt32 Source
type TypeUInt32Sym0 = TypeUInt32 Source
type TypeInt64Sym0 = TypeInt64 Source
type TypeUInt64Sym0 = TypeUInt64 Source
type TypeDoubleSym0 = TypeDouble Source
type TypeUnixFDSym0 = TypeUnixFD Source
type TypeStringSym0 = TypeString Source
type TypeSignatureSym0 = TypeSignature Source
type SDBusSimpleType z = Sing z Source
type DBusSimpleTypeSym1 t = DBusSimpleType t Source
data DBusSimpleTypeSym0 l Source
forall arg . (~) (KindOf (Apply DBusSimpleTypeSym0 arg)) (KindOf (DBusSimpleTypeSym1 arg)) => DBusSimpleTypeSym0KindInference |
type TypeArraySym1 t = TypeArray t Source
data TypeArraySym0 l Source
forall arg . (~) (KindOf (Apply TypeArraySym0 arg)) (KindOf (TypeArraySym1 arg)) => TypeArraySym0KindInference |
SuppressUnusedWarnings (TyFun DBusType DBusType -> *) TypeArraySym0 | |
type Apply DBusType DBusType TypeArraySym0 l0 = TypeArraySym1 l0 |
type TypeStructSym1 t = TypeStruct t Source
data TypeStructSym0 l Source
forall arg . (~) (KindOf (Apply TypeStructSym0 arg)) (KindOf (TypeStructSym1 arg)) => TypeStructSym0KindInference |
SuppressUnusedWarnings (TyFun [DBusType] DBusType -> *) TypeStructSym0 | |
type Apply DBusType [DBusType] TypeStructSym0 l0 = TypeStructSym1 l0 |
type TypeDictSym2 t t = TypeDict t t Source
data TypeDictSym1 l l Source
forall arg . (~) (KindOf (Apply (TypeDictSym1 l) arg)) (KindOf (TypeDictSym2 l arg)) => TypeDictSym1KindInference |
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) TypeDictSym1 | |
type Apply DBusType DBusType (TypeDictSym1 l1) l0 = TypeDictSym2 l1 l0 |
data TypeDictSym0 l Source
forall arg . (~) (KindOf (Apply TypeDictSym0 arg)) (KindOf (TypeDictSym1 arg)) => TypeDictSym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) TypeDictSym0 | |
type Apply (TyFun DBusType DBusType -> *) DBusSimpleType TypeDictSym0 l0 = TypeDictSym1 l0 |
type TypeVariantSym0 = TypeVariant Source
type TypeDictEntrySym2 t t = TypeDictEntry t t Source
data TypeDictEntrySym1 l l Source
forall arg . (~) (KindOf (Apply (TypeDictEntrySym1 l) arg)) (KindOf (TypeDictEntrySym2 l arg)) => TypeDictEntrySym1KindInference |
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) TypeDictEntrySym1 | |
type Apply DBusType DBusType (TypeDictEntrySym1 l1) l0 = TypeDictEntrySym2 l1 l0 |
data TypeDictEntrySym0 l Source
forall arg . (~) (KindOf (Apply TypeDictEntrySym0 arg)) (KindOf (TypeDictEntrySym1 arg)) => TypeDictEntrySym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) TypeDictEntrySym0 | |
type Apply (TyFun DBusType DBusType -> *) DBusSimpleType TypeDictEntrySym0 l0 = TypeDictEntrySym1 l0 |
type TypeUnitSym0 = TypeUnit Source
type family Equals_1627481944 a b :: Bool Source
Equals_1627481944 Null Null = TrueSym0 | |
Equals_1627481944 (Arg a) (Arg b) = (:==) a b | |
Equals_1627481944 (a :: Parity) (b :: Parity) = FalseSym0 |
type family Equals_1627481902 a b :: Bool Source
Equals_1627481902 (DBusSimpleType a) (DBusSimpleType b) = (:==) a b | |
Equals_1627481902 (TypeArray a) (TypeArray b) = (:==) a b | |
Equals_1627481902 (TypeStruct a) (TypeStruct b) = (:==) a b | |
Equals_1627481902 (TypeDict a a) (TypeDict b b) = (:&&) ((:==) a b) ((:==) a b) | |
Equals_1627481902 TypeVariant TypeVariant = TrueSym0 | |
Equals_1627481902 (TypeDictEntry a a) (TypeDictEntry b b) = (:&&) ((:==) a b) ((:==) a b) | |
Equals_1627481902 TypeUnit TypeUnit = TrueSym0 | |
Equals_1627481902 (a :: DBusType) (b :: DBusType) = FalseSym0 |
type family Equals_1627481895 a b :: Bool Source
data DBusStruct :: [DBusType] -> * where Source
StructSingleton :: DBusValue a -> DBusStruct `[a]` | |
StructCons :: DBusValue a -> DBusStruct as -> DBusStruct (a : as) |
Eq (DBusStruct t) | |
SingI [DBusType] a => Show (DBusStruct a) |
data SomeDBusStruct where Source
SDBS :: SingI ts => DBusStruct ts -> SomeDBusStruct |
showStruct :: Sing a -> DBusStruct a -> String Source
data DBusValue :: DBusType -> * where Source
Eq (DBusValue t) | |
SingI DBusType t => Show (DBusValue t) | |
SingI DBusType t => IsMethod (IO (DBusValue t)) | |
(IsMethod f, SingI DBusType t) => IsMethod (DBusValue t -> f) | |
type ArgTypes (IO (DBusValue t)) = [] DBusType | |
type ResultType (IO (DBusValue t)) = t | |
type ArgTypes (DBusValue t -> f) = (:) DBusType t (ArgTypes f) | |
type ResultType (DBusValue t -> f) = ResultType f |
dbusSValue :: SingI t => SomeDBusValue -> Maybe (DBusValue (DBusSimpleType t)) Source
fromVariant :: SingI t => DBusValue TypeVariant -> Maybe (DBusValue t) Source
Extract a DBusValue from a Variant iff the type matches or return nothing
class Representable a where Source
data MethodWrapper av rv where Source
MReturn :: SingI t => IO (DBusValue t) -> MethodWrapper [] t | |
MAsk :: SingI t => (DBusValue t -> MethodWrapper avs rv) -> MethodWrapper (t : avs) rv |
Method :: (SingI avs, SingI t) => MethodWrapper avs t -> Text -> MethodDescription (ArgParity avs) -> Method |
data Annotation Source
data Connection Source
Connection | |
|
data MethodError Source
type Slot = Either [SomeDBusValue] SomeDBusValue -> STM () Source
type AnswerSlots = Map Serial Slot Source
data DBusConnection Source
DBusConnection | |
|