 >          , path "abc" >> emptyPath >> okay "This is /abc"
-- >          , path "abc" >> path "123" >> emptyPath >> okay "This is /abc/123"
-- >          ]
path ∷ B.ByteString → Route ()
path s = do
    (r, rhs) ← get
    guard ∘ not ∘ null $ reqPath r
    guard $ head (reqPath r) ≡ s
    put (r{reqPath=tail $ reqPath r}, rhs)
{-# INLINEABLE path #-}

-- | Pop the top element off the path stack
popPath ∷ Route B.ByteString
popPath = do
    (r, rhs) ← get
    guard ∘ no
path ∷ B.ByteString → Route ()
path s = do
    (r, rhs) ← get
    guard ∘ not ∘ null $ reqPath r
    guard $ head (reqPath r) ≡ s
    put (r{reqPath=tail $ reqPath r}, rhs)

path s = do
    (r, rhs) ← get
    guard ∘ not ∘ null $ reqPath r
    guard $ head (reqPath r) ≡ s
    put (r{reqPath=tail $ reqPath r}, rhs)
