aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--plugins/extraction/haskell.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/extraction/haskell.ml b/plugins/extraction/haskell.ml
index e23e3bf79..b51a957af 100644
--- a/plugins/extraction/haskell.ml
+++ b/plugins/extraction/haskell.ml
@@ -45,6 +45,7 @@ let preamble mod_name used_modules usf =
(if used_modules = [] then mt () else fnl ()) ++
(if not usf.magic then mt ()
else str "\
+\nunsafeCoerce :: a -> b\
\n#ifdef __GLASGOW_HASKELL__\
\nimport qualified GHC.Base\
\nunsafeCoerce = GHC.Base.unsafeCoerce#\
@@ -55,7 +56,8 @@ let preamble mod_name used_modules usf =
\n#endif" ++ fnl2 ())
++
(if not usf.mldummy then mt ()
- else str "__ = Prelude.error \"Logical or arity value used\"" ++ fnl2 ())
+ else str "__ :: any" ++ fnl () ++
+ str "__ = Prelude.error \"Logical or arity value used\"" ++ fnl2 ())
let pp_abst = function
| [] -> (mt ())