#lang scheme/base
(require net/url
scheme/contract
scheme/pretty
(planet untyped/unlib/debug)
(planet untyped/unlib/exn)
(planet untyped/unlib/url))
(define-struct (exn:dispatch exn) () #:transparent)
(define-struct (exn:fail:dispatch exn:fail) () #:transparent)
(define dispatch-url-cleaner
(make-parameter (lambda (url)
(url-remove-params (url-path-only url)))))
(define (clean-url url)
((dispatch-url-cleaner) url))
(provide (all-from-out scheme/pretty
(planet untyped/unlib/debug)
(planet untyped/unlib/exn))
(struct-out exn:dispatch)
(struct-out exn:fail:dispatch))
(provide/contract
[dispatch-url-cleaner (parameter/c (-> url? url?))]
[clean-url (-> url? url?)])