Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
This module provides the ServiceType
type.
Synopsis
- data ServiceType result where
- BatteryPercentage :: !BatteryApp -> ServiceType Battery
- BatteryStatus :: !BatteryApp -> ServiceType BatteryStatus
- NetworkInterface :: !Device -> !NetInterfaceApp -> ServiceType NetInterface
- Single :: !Command -> ServiceType Text
- Multiple :: !Command -> ServiceType Text
Documentation
data ServiceType result where Source #
ServiceType
describes all implemented services.
It provides several built-in services for querying and parsing
system information (from the pythia
package), and then
Single
and Multiple
for custom services. It is a GADT so
we can link each service with its result type.
BatteryPercentage :: !BatteryApp -> ServiceType Battery | |
BatteryStatus :: !BatteryApp -> ServiceType BatteryStatus | |
NetworkInterface :: !Device -> !NetInterfaceApp -> ServiceType NetInterface | |
Single :: !Command -> ServiceType Text | |
Multiple :: !Command -> ServiceType Text |
Instances
Show (ServiceType result) Source # | |
Defined in Navi.Services.Types | |
Eq (ServiceType result) Source # | |
Defined in Navi.Services.Types (==) :: ServiceType result -> ServiceType result -> Bool Source # (/=) :: ServiceType result -> ServiceType result -> Bool Source # |