diff options
| author | Maxime Dénès | 2020-01-08 11:21:20 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2020-01-08 15:07:16 +0100 |
| commit | 3987b5cab0b889ca71b52843abf7563b9b95e946 (patch) | |
| tree | 5c08585ca056c23db9d9b49f05012fa735d37f79 /plugins/extraction | |
| parent | ad3ece31bbb13b940d1a48f8fd694295f290fea3 (diff) | |
Better extraction of string literals in Haskell
Diffstat (limited to 'plugins/extraction')
| -rw-r--r-- | plugins/extraction/common.ml | 1 | ||||
| -rw-r--r-- | plugins/extraction/haskell.ml | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/plugins/extraction/common.ml b/plugins/extraction/common.ml index 742dca612a..29da12de40 100644 --- a/plugins/extraction/common.ml +++ b/plugins/extraction/common.ml @@ -678,6 +678,7 @@ let check_extract_string () = try let string_type = match lang () with | Ocaml -> "string" + | Haskell -> "Prelude.String" | _ -> raise Not_found in String.equal (find_custom @@ string_type_ref ()) string_type diff --git a/plugins/extraction/haskell.ml b/plugins/extraction/haskell.ml index bde37bcae7..eef050efbd 100644 --- a/plugins/extraction/haskell.ml +++ b/plugins/extraction/haskell.ml @@ -171,6 +171,7 @@ let rec pp_expr par env args = assert (List.is_empty args); begin match a with | _ when is_native_char c -> pp_native_char c + | _ when is_native_string c -> pp_native_string c | [] -> pp_global Cons r | [a] -> pp_par par (pp_global Cons r ++ spc () ++ pp_expr true env [] a) |
