Add an error parameter to the ThrowAll typeclass#152
Add an error parameter to the ThrowAll typeclass#152AJChapman wants to merge 1 commit intohaskell-servant:masterfrom
Conversation
This is so that an application can use its own custom error type and still call `throwAll`.
|
Could you define |
|
@domenkozar I have tried your suggestion but I can't get it to work. For example, with the type alias we still get errors like this: I think to avoid a breaking change I would have to create typeclass |
|
Maybe that's a good candidate for servant then: haskell-servant/servant#765 @phadej @alpmestan what do you think? |
|
I wonder if that's what https://hackage.haskell.org/package/servant-generate-0.1/docs/Servant-Server-Generate.html does. |
|
servant-generate was inspired by -auth's venerable And I think it should cover this use case, indeed. |
|
See #168 |
This is so that an application can use its own custom error type and still call
throwAll.