zero-bs-haskell
zero-bs-haskell copied to clipboard
Error building the `handlersWithState` example
Following the readme example with the steteful counterHandler I get the following error when trying to compile it:
• Couldn't match expected type: Server.StatefulHandler Int
with actual type: Int -> Server.Request -> (Int, Server.Response)
• Probable cause: ‘counterHandler’ is applied to too few arguments
In the expression: counterHandler
In the second argument of ‘Server.handlersWithState’, namely
‘[counterHandler]’
In the expression:
Server.handlersWithState initialState [counterHandler]
|
28 | [ Server.handlersWithState initialState [counterHandler]
| ^^^^^^^^^^^^^^