Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data State v = State {}
- class FlattenServer api where
- flattenServer :: Server api -> Bundled (Endpoints api)
- type ReifiedEndpoint = ([TypeRep], TypeRep, Dynamic)
- type ReifiedApi = [(ApiOffset, [TypeRep], TypeRep, Dynamic)]
- data Bundled endpoints where
- AnEndpoint :: Server endpoint -> Bundled endpoints -> Bundled (endpoint ': endpoints)
- NoEndpoints :: Bundled '[]
- class ToReifiedApi (endpoints :: [*]) where
- toReifiedApi :: Bundled endpoints -> Proxy endpoints -> ReifiedApi
- class ToReifiedEndpoint (endpoint :: *) where
- toReifiedEndpoint :: Dynamic -> Proxy endpoint -> ReifiedEndpoint
- class NormalizeFunction m where
- newtype ApiOffset = ApiOffset Int
- data Op (v :: * -> *) = Op ApiOffset [(TypeRep, Var (Opaque (IORef Dynamic)) v)]
- callEndpoint :: (MonadGen n, MonadIO m) => ReifiedApi -> Command n m State
- prop_sequential :: ReifiedApi -> Property
- prop_concurrent :: ReifiedApi -> Property
Documentation
class FlattenServer api where Source #
Instances
(Endpoints (endpoint :<|> api) ~ (endpoint ': Endpoints api), Server (endpoint :<|> api) ~ (Server endpoint :<|> Server api), FlattenServer api) => FlattenServer (endpoint :<|> api) Source # | |
Defined in Roboservant.StateMachine | |
(HasServer (x :> api) ([] :: [Type]), Endpoints (x :> api) ~ ((x :> api) ': ([] :: [Type]))) => FlattenServer (x :> api) Source # | |
Defined in Roboservant.StateMachine | |
(HasServer (Verb method statusCode contentTypes responseType) ([] :: [Type]), Endpoints (Verb method statusCode contentTypes responseType) ~ (Verb method statusCode contentTypes responseType ': ([] :: [Type]))) => FlattenServer (Verb method statusCode contentTypes responseType) Source # | |
Defined in Roboservant.StateMachine |
data Bundled endpoints where Source #
AnEndpoint :: Server endpoint -> Bundled endpoints -> Bundled (endpoint ': endpoints) | |
NoEndpoints :: Bundled '[] |
class ToReifiedApi (endpoints :: [*]) where Source #
toReifiedApi :: Bundled endpoints -> Proxy endpoints -> ReifiedApi Source #
Instances
ToReifiedApi ([] :: [Type]) Source # | |
Defined in Roboservant.StateMachine toReifiedApi :: Bundled [] -> Proxy [] -> ReifiedApi Source # | |
(Typeable (Normal (ServerT endpoint Handler)), NormalizeFunction (ServerT endpoint Handler), ToReifiedEndpoint endpoint, ToReifiedApi endpoints, Typeable (ServerT endpoint Handler)) => ToReifiedApi (endpoint ': endpoints) Source # | |
Defined in Roboservant.StateMachine toReifiedApi :: Bundled (endpoint ': endpoints) -> Proxy (endpoint ': endpoints) -> ReifiedApi Source # |
class ToReifiedEndpoint (endpoint :: *) where Source #
toReifiedEndpoint :: Dynamic -> Proxy endpoint -> ReifiedEndpoint Source #
Instances
(Typeable requestType, ToReifiedEndpoint endpoint) => ToReifiedEndpoint (ReqBody contentTypes requestType :> endpoint) Source # | |
Defined in Roboservant.StateMachine toReifiedEndpoint :: Dynamic -> Proxy (ReqBody contentTypes requestType :> endpoint) -> ReifiedEndpoint Source # | |
(Typeable requestType, ToReifiedEndpoint endpoint) => ToReifiedEndpoint (Capture name requestType :> endpoint) Source # | |
Defined in Roboservant.StateMachine toReifiedEndpoint :: Dynamic -> Proxy (Capture name requestType :> endpoint) -> ReifiedEndpoint Source # | |
ToReifiedEndpoint endpoint => ToReifiedEndpoint (x :> endpoint) Source # | |
Defined in Roboservant.StateMachine toReifiedEndpoint :: Dynamic -> Proxy (x :> endpoint) -> ReifiedEndpoint Source # | |
Typeable responseType => ToReifiedEndpoint (Verb method statusCode contentTypes responseType) Source # | |
Defined in Roboservant.StateMachine toReifiedEndpoint :: Dynamic -> Proxy (Verb method statusCode contentTypes responseType) -> ReifiedEndpoint Source # |
class NormalizeFunction m where Source #
Instances
Typeable x => NormalizeFunction (Handler x) Source # | |
NormalizeFunction x => NormalizeFunction (r -> x) Source # | |
Instances
Enum ApiOffset Source # | |
Defined in Roboservant.StateMachine succ :: ApiOffset -> ApiOffset # pred :: ApiOffset -> ApiOffset # fromEnum :: ApiOffset -> Int # enumFrom :: ApiOffset -> [ApiOffset] # enumFromThen :: ApiOffset -> ApiOffset -> [ApiOffset] # enumFromTo :: ApiOffset -> ApiOffset -> [ApiOffset] # enumFromThenTo :: ApiOffset -> ApiOffset -> ApiOffset -> [ApiOffset] # | |
Eq ApiOffset Source # | |
Num ApiOffset Source # | |
Defined in Roboservant.StateMachine | |
Show ApiOffset Source # | |
data Op (v :: * -> *) Source #
we need to specify an offset because it's entirely possible to have two functions with the same arguments that do different things.
Instances
HTraversable Op Source # | |
Defined in Roboservant.StateMachine htraverse :: Applicative f => (forall a. g a -> f (h a)) -> Op g -> f (Op h) # | |
Show (Op Symbolic) Source # | |
callEndpoint :: (MonadGen n, MonadIO m) => ReifiedApi -> Command n m State Source #
prop_sequential :: ReifiedApi -> Property Source #
prop_concurrent :: ReifiedApi -> Property Source #