Closed sordina closed 1 year ago
Looks like some of the apt-get CI commands are failing?
Noticed this warning when compiling:
Web/Scotty/Internal/Types.hs:168:5: warning: [-Wnoncanonical-monad-instances]
Noncanonical ‘return’ definition detected
in the instance declaration for ‘Monad (ActionT e m)’.
‘return’ will eventually be removed in favour of ‘pure’
Either remove definition for ‘return’ (recommended) or define as ‘return = pure’
See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
|
168 | return = ActionT . return
yes we have a ticket and a PR for this already!
On Fri, 7 Jul 2023 at 09:38, Lyndon Maydwell @.***> wrote:
Noticed this warning when compiling:
Web/Scotty/Internal/Types.hs:168:5: warning: [-Wnoncanonical-monad-instances] Noncanonical ‘return’ definition detected in the instance declaration for ‘Monad (ActionT e m)’. ‘return’ will eventually be removed in favour of ‘pure’ Either remove definition for ‘return’ (recommended) or define as ‘return = pure’ See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return | 168 | return = ActionT . return
— Reply to this email directly, view it on GitHub https://github.com/scotty-web/scotty/pull/233#issuecomment-1624911874, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBDKBAD5UMCCFWBF5M4T3XO64F7ANCNFSM4JEOOT6Q . You are receiving this because you were mentioned.Message ID: @.***>
@ocramz I've added a spec that matches the simple example from examples/nested.hs
.
wyt @fumieval is this good to merge?
@sordina once you're able to add an entry to the Changelog I'll gladly merge. Thank you!
@ocramz Added a changelog entry under the next
heading
@sordina Thank you! all good 👍
This PR adds a new
nested
handler that allows you to place an entire WAI Application under a Scotty route.Let me know if this implementation fits!
Simple Example:
Reference:
describe nested
inScottySpec.hs
.examples/nested.hs