Skip to content

Commit

Permalink
fix comment syntax in Route for 8.10 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Zocca committed Dec 3, 2023
1 parent 8158a8c commit d8edaef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Web/Scotty/Route.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ route :: (MonadUnliftIO m) =>
-> Maybe (ErrorHandler m) -> Maybe StdMethod -> RoutePattern -> ActionT m () -> BodyInfo -> Middleware m
route opts h method pat action bodyInfo app req =
let tryNext = app req
{- |
We match all methods in the case where 'method' is 'Nothing'.
See https://github.com/scotty-web/scotty/issues/196 and 'matchAny'
-}
-- We match all methods in the case where 'method' is 'Nothing'.
-- See https://github.com/scotty-web/scotty/issues/196 and 'matchAny'
methodMatches :: Bool
methodMatches = maybe True (\x -> (Right x == parseMethod (requestMethod req))) method

Expand Down

0 comments on commit d8edaef

Please sign in to comment.