git.iko.soy/typeable/servant-reflex
on master help sign in
tweak readme
fb3dd22Greg Hale
README.md+1
@@ -65,6 +65,7 @@ type API = "getint" :> Get '[JSON] Int
65These client functions are computed from the API and manage serialization, XhrRequest generation, and deserialization for you. `a` parameters become `Behavior t (Maybe a)` values. You provide a trigger event and receive an `Event t (Maybe r, XhrResponse)`, with responses from the API server (which you would write with `servant-server`).
65These client functions are computed from the API and manage serialization, XhrRequest generation, and deserialization for you. `a` parameters become `Behavior t (Maybe a)` values. You provide a trigger event and receive an `Event t (Maybe r, XhrResponse)`, with responses from the API server (which you would write with `servant-server`).
66
66
67```haskell
67```haskell
68+ -- No need to write these functions. servant-reflex creates them for you!
68 getint :: MonadWidget t m
69 getint :: MonadWidget t m
69 => Event t () -- ^ Trigger the XHR Request
70 => Event t () -- ^ Trigger the XHR Request
70 -> m (Event t (Maybe (Int, XhrResponse))) -- ^ Consume the answer
71 -> m (Event t (Maybe (Int, XhrResponse))) -- ^ Consume the answer