diff --git a/plugins/qcheck-stm/src/config.ml b/plugins/qcheck-stm/src/config.ml index 36064d7b..c13ce218 100644 --- a/plugins/qcheck-stm/src/config.ml +++ b/plugins/qcheck-stm/src/config.ml @@ -221,7 +221,12 @@ let init gospel config_module = let open Reserr in try let module_name = Utils.module_name_of_path gospel - and env, sigs = Utils.type_check [] gospel in + and env, sigs = + match Filename.extension gospel with + | ".mli" -> Utils.type_check [] gospel + | ".gospel" -> Utils.read_gospel_file gospel + | _ -> invalid_arg "init" + in assert (List.length env = 1); let namespace = List.hd env in let context = Context.init module_name namespace in