module Wire.API.Federation.Component
( module Wire.API.Federation.Component,
Component (..),
)
where
import Data.Proxy
import Imports
import Wire.API.Component (Component (..))
componentName :: Component -> Text
componentName :: Component -> Text
componentName Component
Brig = Text
"brig"
componentName Component
Galley = Text
"galley"
componentName Component
Cargohold = Text
"cargohold"
class KnownComponent (c :: Component) where
componentVal :: Component
instance KnownComponent 'Brig where
componentVal :: Component
componentVal = Component
Brig
instance KnownComponent 'Galley where
componentVal :: Component
componentVal = Component
Galley
instance KnownComponent 'Cargohold where
componentVal :: Component
componentVal = Component
Cargohold
data SomeComponent where
SomeComponent :: (KnownComponent c) => Proxy c -> SomeComponent
someComponent :: Component -> SomeComponent
someComponent :: Component -> SomeComponent
someComponent Component
Brig = Proxy 'Brig -> SomeComponent
forall (c :: Component).
KnownComponent c =>
Proxy c -> SomeComponent
SomeComponent (forall {k} (t :: k). Proxy t
forall (t :: Component). Proxy t
Proxy @'Brig)
someComponent Component
Galley = Proxy 'Galley -> SomeComponent
forall (c :: Component).
KnownComponent c =>
Proxy c -> SomeComponent
SomeComponent (forall {k} (t :: k). Proxy t
forall (t :: Component). Proxy t
Proxy @'Galley)
someComponent Component
Cargohold = Proxy 'Cargohold -> SomeComponent
forall (c :: Component).
KnownComponent c =>
Proxy c -> SomeComponent
SomeComponent (forall {k} (t :: k). Proxy t
forall (t :: Component). Proxy t
Proxy @'Cargohold)