diff --git a/src/fut.ml b/src/fut.ml index 34973022..e5d7d235 100644 --- a/src/fut.ml +++ b/src/fut.ml @@ -354,3 +354,9 @@ end) = Infix_ (struct let pool = Some X.pool end) + +let[@inline] infix pool : (module INFIX) = + let module M = Infix (struct + let pool = pool + end) in + (module M) diff --git a/src/fut.mli b/src/fut.mli index ceee34e9..b80e0c48 100644 --- a/src/fut.mli +++ b/src/fut.mli @@ -154,3 +154,7 @@ include INFIX module Infix (_ : sig val pool : Pool.t end) : INFIX + +val infix : Pool.t -> (module INFIX) +(** [infix pool] makes a new infix module. + @since 0.2 *)