Safe Haskell | None |
---|---|
Language | Haskell2010 |
- dbusLogger :: String
- logDebug :: String -> IO ()
- logWarning :: String -> IO ()
- logError :: String -> IO ()
- data ObjectPath = ObjectPath {
- opAbsolute :: Bool
- opParts :: [Text]
- type InterfaceName = Text
- type MemberName = Text
- opNode :: ObjectPath -> ObjectPath
- opPath :: ObjectPath -> ObjectPath
- 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 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_1627467017 a b :: Bool
- type family Equals_1627466975 a b :: Bool
- type family Equals_1627466968 a b :: Bool
- type Let1627472099T wild_1627472091 = Apply DBusSimpleTypeSym0 wild_1627472091
- type Let1627472099TSym1 t = Let1627472099T t
- data Let1627472099TSym0 l = forall arg . (KindOf (Apply Let1627472099TSym0 arg) ~ KindOf (Let1627472099TSym1 arg)) => Let1627472099TSym0KindInference
- type Let1627472104T wild_1627472089 = Apply TypeArraySym0 wild_1627472089
- type Let1627472104TSym1 t = Let1627472104T t
- data Let1627472104TSym0 l = forall arg . (KindOf (Apply Let1627472104TSym0 arg) ~ KindOf (Let1627472104TSym1 arg)) => Let1627472104TSym0KindInference
- type Let1627472110T wild_1627472085 wild_1627472087 = Apply (Apply TypeDictSym0 wild_1627472085) wild_1627472087
- type Let1627472110TSym2 t t = Let1627472110T t t
- data Let1627472110TSym1 l l = forall arg . (KindOf (Apply (Let1627472110TSym1 l) arg) ~ KindOf (Let1627472110TSym2 l arg)) => Let1627472110TSym1KindInference
- data Let1627472110TSym0 l = forall arg . (KindOf (Apply Let1627472110TSym0 arg) ~ KindOf (Let1627472110TSym1 arg)) => Let1627472110TSym0KindInference
- type Let1627472120T wild_1627472081 wild_1627472083 = Apply (Apply TypeDictEntrySym0 wild_1627472081) wild_1627472083
- type Let1627472120TSym2 t t = Let1627472120T t t
- data Let1627472120TSym1 l l = forall arg . (KindOf (Apply (Let1627472120TSym1 l) arg) ~ KindOf (Let1627472120TSym2 l arg)) => Let1627472120TSym1KindInference
- data Let1627472120TSym0 l = forall arg . (KindOf (Apply Let1627472120TSym0 arg) ~ KindOf (Let1627472120TSym1 arg)) => Let1627472120TSym0KindInference
- type Let1627472128T = TypeVariantSym0
- type Let1627472128TSym0 = Let1627472128T
- type family FlattenRepType a :: [DBusType]
- type FlattenRepTypeSym1 t = FlattenRepType t
- data FlattenRepTypeSym0 l = forall arg . (KindOf (Apply FlattenRepTypeSym0 arg) ~ KindOf (FlattenRepTypeSym1 arg)) => FlattenRepTypeSym0KindInference
- sFlattenRepType :: forall t. Sing t -> Sing (Apply FlattenRepTypeSym0 t)
- flattenRepType :: DBusType -> [DBusType]
- newtype MethodHandlerT m a = MHT {
- unMHT :: ExceptT MsgError (WriterT [SomeSignal] m) a
- methodError :: Monad m => MsgError -> MethodHandlerT m a
- catchMethodError :: Monad m => MethodHandlerT m a -> (MsgError -> MethodHandlerT m a) -> MethodHandlerT m a
- runMethodHandlerT :: MethodHandlerT m a -> m (Either MsgError a, [SomeSignal])
- data Signal a = Signal {}
- data SomeSignal where
- SomeSignal :: SingI a => Signal a -> SomeSignal
- data SignalDescription a = SignalDescription {}
- signalDArgumentTypes :: SingI ts => SignalDescription ts -> [DBusType]
- data SomeSignalDescription where
- SSD :: forall a. SingI a => SignalDescription a -> SomeSignalDescription
- type family ArgsOf x :: Parity
- type family ArgParity x :: Parity
- data ArgumentDescription parity where
- (:>) :: Text -> ArgumentDescription n -> ArgumentDescription (Arg n)
- Done :: ArgumentDescription Null
- adToList :: ArgumentDescription n -> [Text]
- data DBusArguments :: [DBusType] -> * where
- ArgsNil :: DBusArguments []
- ArgsCons :: DBusValue a -> DBusArguments as -> DBusArguments (a : as)
- data SomeDBusArguments where
- SDBA :: SingI ts => DBusArguments ts -> SomeDBusArguments
- listToSomeArguments :: [SomeDBusValue] -> SomeDBusArguments
- argsToValues :: SomeDBusArguments -> [SomeDBusValue]
- argsToStruct :: DBusArguments (t : ts) -> DBusStruct (t : ts)
- structToArgs :: DBusStruct ts -> DBusArguments ts
- maybeArgsToStruct :: (SingI ts, SingI ss) => DBusArguments ts -> Maybe (DBusStruct ss)
- singletonArg :: DBusValue a -> DBusArguments `[a]`
- showArgs :: Sing a -> DBusArguments a -> String
- 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 SingI (RepType a) => Representable a where
- data MethodWrapper av rv where
- MReturn :: SingI ts => MethodHandlerT IO (DBusArguments ts) -> MethodWrapper [] ts
- MAsk :: SingI t => (DBusValue t -> MethodWrapper avs rv) -> MethodWrapper (t : avs) rv
- data Method where
- Method :: (SingI avs, SingI ts) => MethodWrapper avs ts -> Text -> ArgumentDescription (ArgParity avs) -> ArgumentDescription (ArgParity ts) -> Method
- data PropertyAccess
- data PropertyEmitsChangedSignal
- data Property t where
- Property :: forall t. SingI t => {
- propertyPath :: ObjectPath
- propertyInterface :: Text
- propertyName :: Text
- propertyGet :: Maybe (MethodHandlerT IO (DBusValue t))
- propertySet :: Maybe (DBusValue t -> MethodHandlerT IO Bool)
- propertyEmitsChangedSignal :: PropertyEmitsChangedSignal
- Property :: forall t. SingI t => {
- data SomeProperty where
- SomeProperty :: forall t. SingI t => {
- fromSomeProperty :: Property t
- SomeProperty :: forall t. SingI t => {
- propertyType :: SingI t => Property t -> DBusType
- data RemoteProperty a = RP {
- rpEntity :: Text
- rpObject :: ObjectPath
- rpInterface :: Text
- rpName :: Text
- data Annotation = Annotation {}
- data SignalArgument = SignalArgument {}
- data Interface = Interface {}
- newtype Object = Object {}
- object :: Text -> Interface -> Object
- newtype Objects = Objects {}
- root :: ObjectPath -> Object -> Objects
- data MsgError = MsgError {}
- data MethodError
- type Serial = Word32
- type Slot = Either [SomeDBusValue] [SomeDBusValue] -> STM ()
- type AnswerSlots = Map Serial Slot
- data Match a
- checkMatch :: Eq a => Match a -> Match a -> Bool
- maybeToMatch :: Maybe a -> Match a
- data MatchSignal = MatchSignal {}
- anySignal :: MatchSignal
- type SignalSlots = [((Match Text, Match Text, Match ObjectPath, Match Text), SomeSignal -> IO ())]
- type PropertySlots = Map (ObjectPath, Text, Text) [Maybe SomeDBusValue -> IO ()]
- data DBusConnection = DBusConnection {}
- data MethodDescription args rets where
- MD :: {
- methodObjectPath :: ObjectPath
- methodInterface :: Text
- methodMember :: Text
- methodArgs :: ArgumentDescription (ArgParity args)
- methodResult :: ArgumentDescription (ArgParity rets)
- MD :: {
- data SomeMethodDescription where
- SMD :: (SingI args, SingI rets) => MethodDescription args rets -> SomeMethodDescription
Documentation
logWarning :: String -> IO () Source
data ObjectPath Source
ObjectPath | |
|
type InterfaceName = Text Source
type MemberName = Text Source
opNode :: ObjectPath -> ObjectPath Source
opPath :: ObjectPath -> ObjectPath Source
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
Types that are not composite. These can be the keys of a Dict
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) | |
Typeable (Parity -> *) ArgumentDescription | |
SuppressUnusedWarnings (TyFun Parity Parity -> *) ArgSym0 | |
data Sing Parity where | |
type (:==) Parity a0 b0 = Equals_1627467017 a0 b0 | |
type Apply Parity Parity ArgSym0 l0 = ArgSym1 l0 | |
type DemoteRep Parity (KProxy Parity) = Parity |
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_1627467017 a b :: Bool Source
Equals_1627467017 Null Null = TrueSym0 | |
Equals_1627467017 (Arg a) (Arg b) = (:==) a b | |
Equals_1627467017 (a :: Parity) (b :: Parity) = FalseSym0 |
type family Equals_1627466975 a b :: Bool Source
Equals_1627466975 (DBusSimpleType a) (DBusSimpleType b) = (:==) a b | |
Equals_1627466975 (TypeArray a) (TypeArray b) = (:==) a b | |
Equals_1627466975 (TypeStruct a) (TypeStruct b) = (:==) a b | |
Equals_1627466975 (TypeDict a a) (TypeDict b b) = (:&&) ((:==) a b) ((:==) a b) | |
Equals_1627466975 TypeVariant TypeVariant = TrueSym0 | |
Equals_1627466975 (TypeDictEntry a a) (TypeDictEntry b b) = (:&&) ((:==) a b) ((:==) a b) | |
Equals_1627466975 TypeUnit TypeUnit = TrueSym0 | |
Equals_1627466975 (a :: DBusType) (b :: DBusType) = FalseSym0 |
type family Equals_1627466968 a b :: Bool Source
type Let1627472099T wild_1627472091 = Apply DBusSimpleTypeSym0 wild_1627472091 Source
type Let1627472099TSym1 t = Let1627472099T t Source
data Let1627472099TSym0 l Source
forall arg . (KindOf (Apply Let1627472099TSym0 arg) ~ KindOf (Let1627472099TSym1 arg)) => Let1627472099TSym0KindInference |
type Let1627472104T wild_1627472089 = Apply TypeArraySym0 wild_1627472089 Source
type Let1627472104TSym1 t = Let1627472104T t Source
data Let1627472104TSym0 l Source
forall arg . (KindOf (Apply Let1627472104TSym0 arg) ~ KindOf (Let1627472104TSym1 arg)) => Let1627472104TSym0KindInference |
type Let1627472110T wild_1627472085 wild_1627472087 = Apply (Apply TypeDictSym0 wild_1627472085) wild_1627472087 Source
type Let1627472110TSym2 t t = Let1627472110T t t Source
data Let1627472110TSym1 l l Source
forall arg . (KindOf (Apply (Let1627472110TSym1 l) arg) ~ KindOf (Let1627472110TSym2 l arg)) => Let1627472110TSym1KindInference |
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) Let1627472110TSym1 | |
type Apply DBusType DBusType (Let1627472110TSym1 l1) l0 = Let1627472110TSym2 l1 l0 |
data Let1627472110TSym0 l Source
forall arg . (KindOf (Apply Let1627472110TSym0 arg) ~ KindOf (Let1627472110TSym1 arg)) => Let1627472110TSym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) Let1627472110TSym0 | |
type Apply (TyFun DBusType DBusType -> *) DBusSimpleType Let1627472110TSym0 l0 = Let1627472110TSym1 l0 |
type Let1627472120T wild_1627472081 wild_1627472083 = Apply (Apply TypeDictEntrySym0 wild_1627472081) wild_1627472083 Source
type Let1627472120TSym2 t t = Let1627472120T t t Source
data Let1627472120TSym1 l l Source
forall arg . (KindOf (Apply (Let1627472120TSym1 l) arg) ~ KindOf (Let1627472120TSym2 l arg)) => Let1627472120TSym1KindInference |
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) Let1627472120TSym1 | |
type Apply DBusType DBusType (Let1627472120TSym1 l1) l0 = Let1627472120TSym2 l1 l0 |
data Let1627472120TSym0 l Source
forall arg . (KindOf (Apply Let1627472120TSym0 arg) ~ KindOf (Let1627472120TSym1 arg)) => Let1627472120TSym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) Let1627472120TSym0 | |
type Apply (TyFun DBusType DBusType -> *) DBusSimpleType Let1627472120TSym0 l0 = Let1627472120TSym1 l0 |
type Let1627472128T = TypeVariantSym0 Source
type family FlattenRepType a :: [DBusType] Source
FlattenRepType TypeUnit = `[]` | |
FlattenRepType (TypeStruct ts) = ts | |
FlattenRepType (DBusSimpleType wild_1627472091) = Apply (Apply (:$) (Let1627472099TSym1 wild_1627472091)) `[]` | |
FlattenRepType (TypeArray wild_1627472089) = Apply (Apply (:$) (Let1627472104TSym1 wild_1627472089)) `[]` | |
FlattenRepType (TypeDict wild_1627472085 wild_1627472087) = Apply (Apply (:$) (Let1627472110TSym2 wild_1627472085 wild_1627472087)) `[]` | |
FlattenRepType (TypeDictEntry wild_1627472081 wild_1627472083) = Apply (Apply (:$) (Let1627472120TSym2 wild_1627472081 wild_1627472083)) `[]` | |
FlattenRepType TypeVariant = Apply (Apply (:$) Let1627472128TSym0) `[]` |
type FlattenRepTypeSym1 t = FlattenRepType t Source
data FlattenRepTypeSym0 l Source
forall arg . (KindOf (Apply FlattenRepTypeSym0 arg) ~ KindOf (FlattenRepTypeSym1 arg)) => FlattenRepTypeSym0KindInference |
SuppressUnusedWarnings (TyFun DBusType [DBusType] -> *) FlattenRepTypeSym0 | |
type Apply [DBusType] DBusType FlattenRepTypeSym0 l0 = FlattenRepTypeSym1 l0 |
sFlattenRepType :: forall t. Sing t -> Sing (Apply FlattenRepTypeSym0 t) Source
flattenRepType :: DBusType -> [DBusType] Source
newtype MethodHandlerT m a Source
A Transformer for (IO) actions that might want to send a signal.
MonadTrans MethodHandlerT | |
(Functor m, Monad m) => Alternative (MethodHandlerT m) | |
Monad m => Monad (MethodHandlerT m) | |
Functor m => Functor (MethodHandlerT m) | |
Monad m => MonadPlus (MethodHandlerT m) | |
(Monad m, Functor m) => Applicative (MethodHandlerT m) | |
MonadIO m => MonadIO (MethodHandlerT m) | |
Representable t => RepMethod (MethodHandlerT IO t) | |
SingI [DBusType] t => IsMethod (MethodHandlerT IO (DBusArguments t)) | |
type RepMethodArgs (MethodHandlerT IO t) = [] DBusType | |
type RepMethodValue (MethodHandlerT IO t) = FlattenRepType (RepType t) | |
type ArgTypes (MethodHandlerT IO (DBusArguments ts)) = [] DBusType | |
type ResultType (MethodHandlerT IO (DBusArguments ts)) = ts |
methodError :: Monad m => MsgError -> MethodHandlerT m a Source
catchMethodError :: Monad m => MethodHandlerT m a -> (MsgError -> MethodHandlerT m a) -> MethodHandlerT m a Source
runMethodHandlerT :: MethodHandlerT m a -> m (Either MsgError a, [SomeSignal]) Source
data SignalDescription a Source
Eq (SignalDescription a) | |
SingI [DBusType] a => Show (SignalDescription a) | |
Typeable ([DBusType] -> *) SignalDescription |
signalDArgumentTypes :: SingI ts => SignalDescription ts -> [DBusType] Source
data SomeSignalDescription where Source
SSD :: forall a. SingI a => SignalDescription a -> SomeSignalDescription |
data ArgumentDescription parity where Source
(:>) :: Text -> ArgumentDescription n -> ArgumentDescription (Arg n) infixr 0 | |
Done :: ArgumentDescription Null |
Show (ArgumentDescription n) | |
Typeable (Parity -> *) ArgumentDescription |
adToList :: ArgumentDescription n -> [Text] Source
data DBusArguments :: [DBusType] -> * where Source
ArgsNil :: DBusArguments [] | |
ArgsCons :: DBusValue a -> DBusArguments as -> DBusArguments (a : as) |
Eq (DBusArguments t) | |
SingI [DBusType] a => Show (DBusArguments a) | |
SingI [DBusType] t => IsMethod (IO (DBusArguments t)) | |
SingI [DBusType] t => IsMethod (MethodHandlerT IO (DBusArguments t)) | |
type ArgTypes (IO (DBusArguments ts)) = [] DBusType | |
type ResultType (IO (DBusArguments ts)) = ts | |
type ArgTypes (MethodHandlerT IO (DBusArguments ts)) = [] DBusType | |
type ResultType (MethodHandlerT IO (DBusArguments ts)) = ts |
data SomeDBusArguments where Source
SDBA :: SingI ts => DBusArguments ts -> SomeDBusArguments |
argsToStruct :: DBusArguments (t : ts) -> DBusStruct (t : ts) Source
structToArgs :: DBusStruct ts -> DBusArguments ts Source
maybeArgsToStruct :: (SingI ts, SingI ss) => DBusArguments ts -> Maybe (DBusStruct ss) Source
singletonArg :: DBusValue a -> DBusArguments `[a]` Source
showArgs :: Sing a -> DBusArguments a -> String 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 => Representable (DBusValue t) | |
(IsMethod f, SingI DBusType t) => IsMethod (DBusValue t -> f) | |
type RepType (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 SingI (RepType a) => Representable a where Source
Class of types that can be represented in the D-Bus type system.
The toRep and fromRep functions form a Prism and should follow the "obvious" laws:
fromRep (toRep x) == Just x
fmap toRep (fromRep x) =<= Just x
(where x =<= y
iff x
is Nothing
or x == y
)
All DBusValues
represent themselves and instances for
the following "canonical" pairs are provided
Haskell type => D-Bus type
- WordX and IntX => UIntX and IntX respectively (for X in {16, 32, 64})
Bool
=> BooleanWord8
=> ByteDouble
=> DoubleText
=> StringObjectPath
=> ObjectPathDBusType
=> Signature- [a] => Array of a (for Representable a)
ByteString
=> Array of Byte- Tuples up to length 20 => Structs of equal length where each of the members is itself Representable
Map
=> Dict where the keys can be represented by aDBusSimpleType
An instance for String
is impossible because it conflicts with the instance
for lists (use Text instead)
Also note that no Representable instances are provided for Int
, Integer
and Float
.
You can automatically derive an instance for your own Types with
makeRepresentable
toRep :: a -> DBusValue (RepType a) Source
Conversion from Haskell to D-Bus types
fromRep :: DBusValue (RepType a) -> Maybe a Source
Conversion from D-Bus to Haskell types.
data MethodWrapper av rv where Source
MReturn :: SingI ts => MethodHandlerT IO (DBusArguments ts) -> MethodWrapper [] ts | |
MAsk :: SingI t => (DBusValue t -> MethodWrapper avs rv) -> MethodWrapper (t : avs) rv |
Method :: (SingI avs, SingI ts) => MethodWrapper avs ts -> Text -> ArgumentDescription (ArgParity avs) -> ArgumentDescription (ArgParity ts) -> Method |
data PropertyAccess Source
Property :: forall t. SingI t => ObjectPath -> Text -> Text -> Maybe (MethodHandlerT IO (DBusValue t)) -> Maybe (DBusValue t -> MethodHandlerT IO Bool) -> PropertyEmitsChangedSignal -> Property t | |
data SomeProperty where Source
SomeProperty :: forall t. SingI t => Property t -> SomeProperty | |
|
propertyType :: SingI t => Property t -> DBusType Source
data RemoteProperty a Source
RP | |
|
Eq (RemoteProperty k a) | |
Show (RemoteProperty k a) |
data Annotation Source
root :: ObjectPath -> Object -> Objects Source
data MethodError Source
type Slot = Either [SomeDBusValue] [SomeDBusValue] -> STM () Source
type AnswerSlots = Map Serial Slot Source
maybeToMatch :: Maybe a -> Match a Source
data MatchSignal Source
type SignalSlots = [((Match Text, Match Text, Match ObjectPath, Match Text), SomeSignal -> IO ())] Source
type PropertySlots = Map (ObjectPath, Text, Text) [Maybe SomeDBusValue -> IO ()] Source
data DBusConnection Source
data MethodDescription args rets where Source
MD :: ObjectPath -> Text -> Text -> ArgumentDescription (ArgParity args) -> ArgumentDescription (ArgParity rets) -> MethodDescription args rets | |
|
Show (MethodDescription args rets) |
data SomeMethodDescription where Source
SMD :: (SingI args, SingI rets) => MethodDescription args rets -> SomeMethodDescription |