hyperbole-0.4.2: Interactive HTML apps using type-safe serverside Haskell
Safe HaskellNone
LanguageGHC2021

Web.Hyperbole.Effect.Server

Synopsis

Documentation

data Server (a :: Type -> Type) b where Source #

Low level effect mapping request/response to either HTTP or WebSockets

Constructors

LoadRequest :: forall (a :: Type -> Type). Server a Request 
SendResponse :: forall (a :: Type -> Type). Client -> Response -> Server a () 

Instances

Instances details
type DispatchOf Server Source # 
Instance details

Defined in Web.Hyperbole.Effect.Server

runServerWai :: forall (es :: [Effect]) a. IOE :> es => (ByteString -> ByteString) -> Request -> (Response -> IO ResponseReceived) -> Eff (Server ': es) a -> Eff es (Maybe ResponseReceived) Source #

runServerSockets :: forall (es :: [Effect]). IOE :> es => Connection -> Request -> Eff (Server ': es) Response -> Eff es Response Source #

data Client Source #

Constructors

Client 

data SocketError Source #

Constructors

InvalidMessage Text 

Instances

Instances details
Show SocketError Source # 
Instance details

Defined in Web.Hyperbole.Effect.Server

Eq SocketError Source # 
Instance details

Defined in Web.Hyperbole.Effect.Server

newtype Metadata Source #

Constructors

Metadata [(ByteString, Text)] 

Instances

Instances details
Monoid Metadata Source # 
Instance details

Defined in Web.Hyperbole.Effect.Server

Semigroup Metadata Source # 
Instance details

Defined in Web.Hyperbole.Effect.Server

newtype Host Source #

Constructors

Host 

Fields

Instances

Instances details
Show Host Source # 
Instance details

Defined in Web.Hyperbole.Effect.Server

Methods

showsPrec :: Int -> Host -> ShowS #

show :: Host -> String #

showList :: [Host] -> ShowS #

data Request Source #

Constructors

Request 

Instances

Instances details
Show Request Source # 
Instance details

Defined in Web.Hyperbole.Effect.Server

data Response Source #

Valid responses for a Hyperbole effect. Use notFound, etc instead.

newtype TargetViewId Source #

Serialized ViewId

Constructors

TargetViewId Text 

data Event id act Source #

An action, with its corresponding id

Constructors

Event 

Fields

Instances

Instances details
(Show act, Show id) => Show (Event id act) Source # 
Instance details

Defined in Web.Hyperbole.Effect.Server

Methods

showsPrec :: Int -> Event id act -> ShowS #

show :: Event id act -> String #

showList :: [Event id act] -> ShowS #