Skip to content

Commit

Permalink
Generalized type of redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
mightybyte committed Oct 4, 2010
1 parent 6244a6c commit f912888
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Snap/Internal/Types.hs
Expand Up @@ -418,7 +418,7 @@ modifyResponse f = liftSnap $
-- 'Snap' monad. Note that the target URL is not validated in any way. Consider
-- using 'redirect\'' instead, which allows you to choose the correct status
-- code.
redirect :: ByteString -> Snap ()
redirect :: MonadSnap m => ByteString -> m ()
redirect target = redirect' target 302
{-# INLINE redirect #-}

Expand All @@ -428,7 +428,7 @@ redirect target = redirect' target 302
-- URL/path and the status code (should be one of 301, 302, 303 or 307) in the
-- 'Response' object stored in a 'Snap' monad. Note that the target URL is not
-- validated in any way.
redirect' :: ByteString -> Int -> Snap ()
redirect' :: MonadSnap m => ByteString -> Int -> m ()
redirect' target status = do
r <- getResponse

Expand Down

0 comments on commit f912888

Please sign in to comment.