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 = (Sing :: DBusSimpleType -> *)
- 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 = (Sing :: DBusType -> *)
- type NullSym0 = Null
- type ArgSym1 t = Arg t
- data ArgSym0 l = forall arg . (KindOf (Apply ArgSym0 arg) ~ KindOf (ArgSym1 arg)) => ArgSym0KindInference
- type SParity = (Sing :: Parity -> *)
- type family Equals_1627484019 a b :: Bool
- type family Equals_1627483977 a b :: Bool
- type family Equals_1627483970 a b :: Bool
- type family Let1627489513T wild_1627489505
- type Let1627489513TSym1 t = Let1627489513T t
- data Let1627489513TSym0 l = forall arg . (KindOf (Apply Let1627489513TSym0 arg) ~ KindOf (Let1627489513TSym1 arg)) => Let1627489513TSym0KindInference
- type family Let1627489518T wild_1627489503
- type Let1627489518TSym1 t = Let1627489518T t
- data Let1627489518TSym0 l = forall arg . (KindOf (Apply Let1627489518TSym0 arg) ~ KindOf (Let1627489518TSym1 arg)) => Let1627489518TSym0KindInference
- type family Let1627489524T wild_1627489499 wild_1627489501
- type Let1627489524TSym2 t t = Let1627489524T t t
- data Let1627489524TSym1 l l = forall arg . (KindOf (Apply (Let1627489524TSym1 l) arg) ~ KindOf (Let1627489524TSym2 l arg)) => Let1627489524TSym1KindInference
- data Let1627489524TSym0 l = forall arg . (KindOf (Apply Let1627489524TSym0 arg) ~ KindOf (Let1627489524TSym1 arg)) => Let1627489524TSym0KindInference
- type family Let1627489534T wild_1627489495 wild_1627489497
- type Let1627489534TSym2 t t = Let1627489534T t t
- data Let1627489534TSym1 l l = forall arg . (KindOf (Apply (Let1627489534TSym1 l) arg) ~ KindOf (Let1627489534TSym2 l arg)) => Let1627489534TSym1KindInference
- data Let1627489534TSym0 l = forall arg . (KindOf (Apply Let1627489534TSym0 arg) ~ KindOf (Let1627489534TSym1 arg)) => Let1627489534TSym0KindInference
- type family Let1627489542T
- type Let1627489542TSym0 = Let1627489542T
- 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 :: [DBusType])
- 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 Source | |
Data Parity Source | |
Show Parity Source | |
SingI Parity Null Source | |
SEq Parity (KProxy Parity) Source | |
PEq Parity (KProxy Parity) Source | |
SingI Parity n0 => SingI Parity (Arg n) Source | |
SingKind Parity (KProxy Parity) Source | |
SuppressUnusedWarnings (TyFun Parity Parity -> *) ArgSym0 Source | |
data Sing Parity where Source | |
type (:/=) Parity x y = Not ((:==) Parity x y) | |
type (:==) Parity a0 b0 = Equals_1627484019 a0 b0 Source | |
type Apply Parity Parity ArgSym0 l0 = ArgSym1 l0 Source | |
type DemoteRep Parity (KProxy Parity) = Parity Source |
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 = (Sing :: DBusSimpleType -> *) 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 Source | |
type Apply DBusType DBusType TypeArraySym0 l0 = TypeArraySym1 l0 Source |
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 Source | |
type Apply DBusType [DBusType] TypeStructSym0 l0 = TypeStructSym1 l0 Source |
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 Source | |
type Apply DBusType DBusType (TypeDictSym1 l1) l0 = TypeDictSym2 l1 l0 Source |
data TypeDictSym0 l Source
forall arg . (KindOf (Apply TypeDictSym0 arg) ~ KindOf (TypeDictSym1 arg)) => TypeDictSym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) TypeDictSym0 Source | |
type Apply (TyFun DBusType DBusType -> *) DBusSimpleType TypeDictSym0 l0 = TypeDictSym1 l0 Source |
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 Source | |
type Apply DBusType DBusType (TypeDictEntrySym1 l1) l0 = TypeDictEntrySym2 l1 l0 Source |
data TypeDictEntrySym0 l Source
forall arg . (KindOf (Apply TypeDictEntrySym0 arg) ~ KindOf (TypeDictEntrySym1 arg)) => TypeDictEntrySym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) TypeDictEntrySym0 Source | |
type Apply (TyFun DBusType DBusType -> *) DBusSimpleType TypeDictEntrySym0 l0 = TypeDictEntrySym1 l0 Source |
type TypeUnitSym0 = TypeUnit Source
type family Equals_1627484019 a b :: Bool Source
Equals_1627484019 Null Null = TrueSym0 | |
Equals_1627484019 (Arg a) (Arg b) = (:==) a b | |
Equals_1627484019 (a :: Parity) (b :: Parity) = FalseSym0 |
type family Equals_1627483977 a b :: Bool Source
Equals_1627483977 (DBusSimpleType a) (DBusSimpleType b) = (:==) a b | |
Equals_1627483977 (TypeArray a) (TypeArray b) = (:==) a b | |
Equals_1627483977 (TypeStruct a) (TypeStruct b) = (:==) a b | |
Equals_1627483977 (TypeDict a a) (TypeDict b b) = (:&&) ((:==) a b) ((:==) a b) | |
Equals_1627483977 TypeVariant TypeVariant = TrueSym0 | |
Equals_1627483977 (TypeDictEntry a a) (TypeDictEntry b b) = (:&&) ((:==) a b) ((:==) a b) | |
Equals_1627483977 TypeUnit TypeUnit = TrueSym0 | |
Equals_1627483977 (a :: DBusType) (b :: DBusType) = FalseSym0 |
type family Equals_1627483970 a b :: Bool Source
type family Let1627489513T wild_1627489505 Source
Let1627489513T wild_1627489505 = Apply DBusSimpleTypeSym0 wild_1627489505 |
type Let1627489513TSym1 t = Let1627489513T t Source
data Let1627489513TSym0 l Source
forall arg . (KindOf (Apply Let1627489513TSym0 arg) ~ KindOf (Let1627489513TSym1 arg)) => Let1627489513TSym0KindInference |
type family Let1627489518T wild_1627489503 Source
Let1627489518T wild_1627489503 = Apply TypeArraySym0 wild_1627489503 |
type Let1627489518TSym1 t = Let1627489518T t Source
data Let1627489518TSym0 l Source
forall arg . (KindOf (Apply Let1627489518TSym0 arg) ~ KindOf (Let1627489518TSym1 arg)) => Let1627489518TSym0KindInference |
type family Let1627489524T wild_1627489499 wild_1627489501 Source
Let1627489524T wild_1627489499 wild_1627489501 = Apply (Apply TypeDictSym0 wild_1627489499) wild_1627489501 |
type Let1627489524TSym2 t t = Let1627489524T t t Source
data Let1627489524TSym1 l l Source
forall arg . (KindOf (Apply (Let1627489524TSym1 l) arg) ~ KindOf (Let1627489524TSym2 l arg)) => Let1627489524TSym1KindInference |
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) Let1627489524TSym1 Source | |
type Apply DBusType DBusType (Let1627489524TSym1 l1) l0 = Let1627489524TSym2 l1 l0 Source |
data Let1627489524TSym0 l Source
forall arg . (KindOf (Apply Let1627489524TSym0 arg) ~ KindOf (Let1627489524TSym1 arg)) => Let1627489524TSym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) Let1627489524TSym0 Source | |
type Apply (TyFun DBusType DBusType -> *) DBusSimpleType Let1627489524TSym0 l0 = Let1627489524TSym1 l0 Source |
type family Let1627489534T wild_1627489495 wild_1627489497 Source
Let1627489534T wild_1627489495 wild_1627489497 = Apply (Apply TypeDictEntrySym0 wild_1627489495) wild_1627489497 |
type Let1627489534TSym2 t t = Let1627489534T t t Source
data Let1627489534TSym1 l l Source
forall arg . (KindOf (Apply (Let1627489534TSym1 l) arg) ~ KindOf (Let1627489534TSym2 l arg)) => Let1627489534TSym1KindInference |
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) Let1627489534TSym1 Source | |
type Apply DBusType DBusType (Let1627489534TSym1 l1) l0 = Let1627489534TSym2 l1 l0 Source |
data Let1627489534TSym0 l Source
forall arg . (KindOf (Apply Let1627489534TSym0 arg) ~ KindOf (Let1627489534TSym1 arg)) => Let1627489534TSym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) Let1627489534TSym0 Source | |
type Apply (TyFun DBusType DBusType -> *) DBusSimpleType Let1627489534TSym0 l0 = Let1627489534TSym1 l0 Source |
type family Let1627489542T Source
type family FlattenRepType a :: [DBusType] Source
FlattenRepType TypeUnit = `[]` | |
FlattenRepType (TypeStruct ts) = ts | |
FlattenRepType (DBusSimpleType wild_1627489505) = Apply (Apply (:$) (Let1627489513TSym1 wild_1627489505)) `[]` | |
FlattenRepType (TypeArray wild_1627489503) = Apply (Apply (:$) (Let1627489518TSym1 wild_1627489503)) `[]` | |
FlattenRepType (TypeDict wild_1627489499 wild_1627489501) = Apply (Apply (:$) (Let1627489524TSym2 wild_1627489499 wild_1627489501)) `[]` | |
FlattenRepType (TypeDictEntry wild_1627489495 wild_1627489497) = Apply (Apply (:$) (Let1627489534TSym2 wild_1627489495 wild_1627489497)) `[]` | |
FlattenRepType TypeVariant = Apply (Apply (:$) Let1627489542TSym0) `[]` |
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 Source | |
type Apply [DBusType] DBusType FlattenRepTypeSym0 l0 = FlattenRepTypeSym1 l0 Source |
sFlattenRepType :: forall t. Sing t -> Sing (Apply FlattenRepTypeSym0 t :: [DBusType]) Source
flattenRepType :: DBusType -> [DBusType] Source
newtype MethodHandlerT m a Source
A Transformer for (IO) actions that might want to send a signal.
MonadTrans MethodHandlerT Source | |
Monad m => Monad (MethodHandlerT m) Source | |
Functor m => Functor (MethodHandlerT m) Source | |
Monad m => Applicative (MethodHandlerT m) Source | |
(Functor m, Monad m) => Alternative (MethodHandlerT m) Source | |
Monad m => MonadPlus (MethodHandlerT m) Source | |
MonadThrow m => MonadThrow (MethodHandlerT m) Source | |
MonadCatch m => MonadCatch (MethodHandlerT m) Source | |
MonadIO m => MonadIO (MethodHandlerT m) Source | |
Representable t => RepMethod (MethodHandlerT IO t) Source | |
SingI [DBusType] t => IsMethod (MethodHandlerT IO (DBusArguments t)) Source | |
type RepMethodArgs (MethodHandlerT IO t) = [] DBusType Source | |
type RepMethodValue (MethodHandlerT IO t) = FlattenRepType (RepType t) Source | |
type ArgTypes (MethodHandlerT IO (DBusArguments ts)) = [] DBusType Source | |
type ResultType (MethodHandlerT IO (DBusArguments ts)) = ts Source |
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) Source | |
SingI [DBusType] a => Show (SignalDescription a) Source |
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 |
adToList :: ArgumentDescription n -> [Text] Source
data DBusArguments :: [DBusType] -> * where Source
ArgsNil :: DBusArguments `[]` | |
ArgsCons :: DBusValue a -> DBusArguments as -> DBusArguments (a : as) |
Eq (DBusArguments t) Source | |
SingI [DBusType] a => Show (DBusArguments a) Source | |
SingI [DBusType] t => IsMethod (IO (DBusArguments t)) Source | |
SingI [DBusType] t => IsMethod (MethodHandlerT IO (DBusArguments t)) Source | |
type ArgTypes (IO (DBusArguments ts)) = [] DBusType Source | |
type ResultType (IO (DBusArguments ts)) = ts Source | |
type ArgTypes (MethodHandlerT IO (DBusArguments ts)) = [] DBusType Source | |
type ResultType (MethodHandlerT IO (DBusArguments ts)) = ts Source |
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) Source | |
SingI [DBusType] a => Show (DBusStruct a) Source |
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) Source | |
SingI DBusType t => Show (DBusValue t) Source | |
(IsMethod f, SingI DBusType t) => IsMethod (DBusValue t -> f) Source | |
type RepType (DBusValue t) = t Source | |
type ArgTypes (DBusValue t -> f) = (:) DBusType t (ArgTypes f) Source | |
type ResultType (DBusValue t -> f) = ResultType f Source |
data SomeDBusValue where Source
DBV :: SingI t => DBusValue t -> SomeDBusValue |
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
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) Source | |
Show (RemoteProperty k a) Source |
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) Source |
data SomeMethodDescription where Source
SMD :: (SingI args, SingI rets) => MethodDescription args rets -> SomeMethodDescription |