diff options
| author | Pierre Letouzey | 2014-02-19 14:51:10 +0100 |
|---|---|---|
| committer | Pierre Letouzey | 2017-10-04 16:24:47 +0200 |
| commit | d459c4b237e764740fdcfba71ac92a79e426f1de (patch) | |
| tree | b3b8171c7bd8b913370a6bd253572e747cd4dcc8 /plugins/extraction/mlutil.ml | |
| parent | 2b9a34e2ffb2bf066b3b0f8452e35622519cae1c (diff) | |
Extraction : minor support stuff for the new Extraction Compute plugin
See https://github.com/letouzey/extraction-compute for more details
Diffstat (limited to 'plugins/extraction/mlutil.ml')
| -rw-r--r-- | plugins/extraction/mlutil.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/extraction/mlutil.ml b/plugins/extraction/mlutil.ml index a4c2bcd883..21d4b3ce4d 100644 --- a/plugins/extraction/mlutil.ml +++ b/plugins/extraction/mlutil.ml @@ -127,11 +127,15 @@ let rec mgu = function | Taxiom, Taxiom -> () | _ -> raise Impossible -let needs_magic p = try mgu p; false with Impossible -> true +let skip_typing () = lang () == Scheme || is_extrcompute () -let put_magic_if b a = if b && lang () != Scheme then MLmagic a else a +let needs_magic p = + if skip_typing () then false + else try mgu p; false with Impossible -> true -let put_magic p a = if needs_magic p && lang () != Scheme then MLmagic a else a +let put_magic_if b a = if b then MLmagic a else a + +let put_magic p a = if needs_magic p then MLmagic a else a let generalizable a = lang () != Ocaml || |
