Skip to content

Commit

Permalink
Remove type paramter from router middleware
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Nov 15, 2020
1 parent 83b5d3d commit 73f7db8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion opium/src/middlewares/middleware_router.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Method_map = Map.Make (struct
;;
end)

type 'a t = (Route.t * 'a) list Method_map.t
type t = (Route.t * Rock.Handler.t) list Method_map.t

let empty = Method_map.empty

Expand Down
8 changes: 4 additions & 4 deletions opium/src/middlewares/middleware_router.mli
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type 'a t
type t

val m : Rock.Handler.t t -> Rock.Middleware.t
val empty : 'action t
val add : 'a t -> route:Route.t -> meth:Method.t -> action:'a -> 'a t
val m : t -> Rock.Middleware.t
val empty : t
val add : t -> route:Route.t -> meth:Method.t -> action:Rock.Handler.t -> t
val param : Request.t -> string -> string
val splat : Request.t -> string list
8 changes: 4 additions & 4 deletions opium/src/opium.mli
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ module App = App
module Route = Route

module Router : sig
type 'action t
type t

val empty : 'action t
val add : 'a t -> route:Route.t -> meth:Method.t -> action:'a -> 'a t
val empty : t
val add : t -> route:Route.t -> meth:Method.t -> action:Rock.Handler.t -> t
val param : Request.t -> string -> string
val splat : Request.t -> string list
end
Expand Down Expand Up @@ -93,7 +93,7 @@ module Middleware : sig
will redirect any URI containing two segments with the last segment containing
"hello" to the handler defined in [Handler.hello_world]. *)
val router : Rock.Handler.t Router.t -> Rock.Middleware.t
val router : Router.t -> Rock.Middleware.t

(** {3 [debugger]} *)

Expand Down

0 comments on commit 73f7db8

Please sign in to comment.