Skip to content

Instantly share code, notes, and snippets.

@gattytto

gattytto/spec Secret

Created November 6, 2020 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gattytto/a43c8ca49936c86a6f9ed68380118bf3 to your computer and use it in GitHub Desktop.
Save gattytto/a43c8ca49936c86a6f9ed68380118bf3 to your computer and use it in GitHub Desktop.
[1 of 3] Compiling AppSpec
/projects/src/github.com/gattytto/example-servant-minimal/test/AppSpec.hs:34:3: error:
* The constructor `FailureResponse' should have 2 arguments, but has been given 1
* In the pattern: FailureResponse response
In a case alternative:
FailureResponse response -> responseStatusCode response == status
In the expression:
case servantError of
FailureResponse response -> responseStatusCode response == status
_ -> False
|
34 | FailureResponse response -> responseStatusCode response == status
| ^^^^^^^^^^^^^^^^^^^^^^^^
/projects/src/github.com/gattytto/example-servant-minimal/test/AppSpec.hs:43:17: error:
* Couldn't match expected type `ClientEnv'
with actual type `(BaseUrl
-> servant-client-core-0.18:Servant.Client.Core.Request.Request
-> http-client-0.7.2.1:Network.HTTP.Client.Types.Request)
-> ClientEnv'
* Probable cause: `ClientEnv' is applied to too few arguments
In the first argument of `action', namely
`(ClientEnv httpManager testBaseUrl Nothing)'
In a stmt of a 'do' block:
action (ClientEnv httpManager testBaseUrl Nothing)
In the expression:
do let testBaseUrl = BaseUrl Http "localhost" port ""
action (ClientEnv httpManager testBaseUrl Nothing)
|
43 | action (ClientEnv httpManager testBaseUrl Nothing)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Progress 1/2
-- While building package example-servant-minimal-0.0.0 (scroll up to its section to see the error) using:
/home/theia/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-linux/Cabal-3.0.1.0 build lib:example-servant-minimal exe:example-servant-minimal test:spec --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment