packages feed

baikai-0.1.0.0: src/Baikai/Provider.hs

-- | The provider surface.
--
-- The prior 'Provider' typeclass and 'SomeProvider' existential are
-- removed. Dispatch now goes through 'Baikai.Provider.Registry':
-- the caller picks a 'Baikai.Model.Model' record and calls
-- 'completeRequest'; the registry looks up the right handler by the
-- model's 'Baikai.Api.Api' tag.
--
-- This module re-exports the registry surface so the
-- @import Baikai.Provider@ habit still resolves the symbols a
-- caller cares about.
module Baikai.Provider
  ( ApiProvider (..),
    ProviderRegistry,
    newProviderRegistry,
    globalProviderRegistry,
    registerApiProviderWith,
    registerApiProvider,
    lookupApiProviderWith,
    lookupApiProvider,
    completeRequestWith,
    completeRequest,
  )
where

import Baikai.Provider.Registry
  ( ApiProvider (..),
    ProviderRegistry,
    completeRequest,
    completeRequestWith,
    globalProviderRegistry,
    lookupApiProvider,
    lookupApiProviderWith,
    newProviderRegistry,
    registerApiProvider,
    registerApiProviderWith,
  )