zero-bs-haskell icon indicating copy to clipboard operation
zero-bs-haskell copied to clipboard

Error building the `handlersWithState` example

Open theodesp opened this issue 2 years ago • 0 comments

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]
   |                                                  ^^^^^^^^^^^^^^

theodesp avatar Mar 06 '23 15:03 theodesp