From 9b01effde4e3fb6d7e9cf54ed1ede6362f77ea72 Mon Sep 17 00:00:00 2001 From: letouzey Date: Mon, 4 Jul 2011 18:05:01 +0000 Subject: Extraction: in haskell, type signatures for __ and unsafeCoerce (fix #2552) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14257 85f007b7-540e-0410-9357-904b9bb8a0f7 --- plugins/extraction/haskell.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/extraction') diff --git a/plugins/extraction/haskell.ml b/plugins/extraction/haskell.ml index e23e3bf798..b51a957af3 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 ()) -- cgit v1.2.3