diff options
Diffstat (limited to 'src/initial_check.ml')
| -rw-r--r-- | src/initial_check.ml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/initial_check.ml b/src/initial_check.ml index 0f1af63d..44f36892 100644 --- a/src/initial_check.ml +++ b/src/initial_check.ml @@ -777,6 +777,11 @@ let typschm_of_string str = let typschm, _ = to_ast_typschm initial_ctx typschm in typschm +let typ_of_string str = + let typ = Parser.typ_eof Lexer.token (Lexing.from_string str) in + let typ = to_ast_typ initial_ctx typ in + typ + let extern_of_string id str = mk_val_spec (VS_val_spec (typschm_of_string str, id, (fun _ -> Some (string_of_id id)), false)) let val_spec_of_string id str = mk_val_spec (VS_val_spec (typschm_of_string str, id, (fun _ -> None), false)) |
