Closed eliaslfox closed 3 years ago
I'm using elm-export version 0.6.0.1 and servant-elm version 0.4.0.1
You were close! You need this:
instance (ElmType a) => ElmType (Headers b a) where
toElmType = toElmType . getResponse
which is now in the latest master (b0741efc35795fb494f969c430c02987da3d7a8f).
To actually extract the response headers in the generated Elm functions will take more work, but it should at least run on your API type now.
I have several endpoints that wrap the response type with headers, such as the following,
I tried fix this with the following
Which compiled, but segfaulted on run.
Is this supported? Did I do something wrong?
I'm using macOS 10.12.6 And GHC version 8.0.2 with stack