diff --git a/src/libraries/project/state_builder.mli b/src/libraries/project/state_builder.mli
index bd94ad5e2bfd7874bb4f732a53e09629c823d2e3..f242dde7e2b1e5c815a8f9ab1166db6a1e7adad4 100644
--- a/src/libraries/project/state_builder.mli
+++ b/src/libraries/project/state_builder.mli
@@ -119,7 +119,7 @@ module Ref
        include Info
        val default: unit -> Data.t
      end)
-  : Ref with type data = Data.t
+  : Ref with type data = Data.t and type Datatype.t = Data.t ref
 
 (** Output signature of [Option_ref]. Note that [get] will raise [Not_found]
     if the stored data is [None]. Use [get_option] if you want to have