Safe Haskell | None |
---|---|
Language | GHC2021 |
Navi.Services.Types
Description
This module provides the ServiceType
type.
Synopsis
- data ServiceType result where
- _BatteryPercentage :: result ~ Battery => Prism' (ServiceType result) BatteryApp
- _BatteryStatus :: result ~ BatteryStatus => Prism' (ServiceType result) BatteryApp
- _Custom :: result ~ CommandResult => Prism' (ServiceType result) (Command, CommandResultParser)
- _NetworkInterface :: result ~ NetInterface => Prism' (ServiceType result) (Device, NetInterfaceApp)
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 Custom
for custom services. It is a GADT so
we can link each service with its result type.
Constructors
Instances
Show (ServiceType result) Source # | |
Defined in Navi.Services.Types Methods showsPrec :: Int -> ServiceType result -> ShowS # show :: ServiceType result -> String # showList :: [ServiceType result] -> ShowS # | |
Eq (ServiceType result) Source # | |
Defined in Navi.Services.Types Methods (==) :: ServiceType result -> ServiceType result -> Bool # (/=) :: ServiceType result -> ServiceType result -> Bool # |
_BatteryPercentage :: result ~ Battery => Prism' (ServiceType result) BatteryApp Source #
_BatteryStatus :: result ~ BatteryStatus => Prism' (ServiceType result) BatteryApp Source #
_Custom :: result ~ CommandResult => Prism' (ServiceType result) (Command, CommandResultParser) Source #
_NetworkInterface :: result ~ NetInterface => Prism' (ServiceType result) (Device, NetInterfaceApp) Source #