diff options
author | Nickolai Zeldovich <nickolai@csail.mit.edu> | 2015-04-04 10:42:18 -0400 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-04-08 12:00:24 +0200 |
commit | c595d5cc3105b0bec4faa0a5ed7e1c37de0c5e2c (patch) | |
tree | 33d637a3281a98fc25384bd7ff8658fc2b7e489d /plugins/extraction/common.ml | |
parent | dfe516d1147d43691a7984af5484d573e42c4e04 (diff) |
Fix specialized extraction of ascii characters into Haskell. (Fix bug #4181)
The extraction machinery has specialized support for extracting [ascii]
characters into native characters in the target language, as opposed
to using an explicit constructor from 8 boolean bits. This works by
hard-coding the name of the character type in the target language.
Unfortunately, the hard-coded type for Haskell was "Char", not the
fully-qualified "Prelude.Char". As a result, it was impossible to
extract characters into Haskell without getting type errors about "Char".
This patch changes this hard-coded name to "Prelude.Char".
Diffstat (limited to 'plugins/extraction/common.ml')
-rw-r--r-- | plugins/extraction/common.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/extraction/common.ml b/plugins/extraction/common.ml index 21819aa8f..0748af1ea 100644 --- a/plugins/extraction/common.ml +++ b/plugins/extraction/common.ml @@ -628,7 +628,7 @@ let check_extract_ascii () = try let char_type = match lang () with | Ocaml -> "char" - | Haskell -> "Char" + | Haskell -> "Prelude.Char" | _ -> raise Not_found in String.equal (find_custom (IndRef (ind_ascii, 0))) (char_type) |