From c595d5cc3105b0bec4faa0a5ed7e1c37de0c5e2c Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Sat, 4 Apr 2015 10:42:18 -0400 Subject: 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". --- plugins/extraction/common.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/extraction/common.ml') 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) -- cgit v1.2.3