diff options
Diffstat (limited to 'plugins/extraction')
| -rw-r--r-- | plugins/extraction/haskell.ml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/extraction/haskell.ml b/plugins/extraction/haskell.ml index f1c13d0175..1d698d1297 100644 --- a/plugins/extraction/haskell.ml +++ b/plugins/extraction/haskell.ml @@ -45,14 +45,14 @@ let preamble mod_name used_modules usf = (if used_modules = [] then mt () else fnl ()) ++ (if not usf.magic then mt () else str "\ -#ifdef __GLASGOW_HASKELL__ -import qualified GHC.Base -unsafeCoerce = GHC.Base.unsafeCoerce# -#else --- HUGS -import qualified IOExts -unsafeCoerce = IOExts.unsafeCoerce -#endif" ++ fnl2 ()) +\n#ifdef __GLASGOW_HASKELL__\ +\nimport qualified GHC.Base\ +\nunsafeCoerce = GHC.Base.unsafeCoerce#\ +\n#else\ +\n-- HUGS\ +\nimport qualified IOExts\ +\nunsafeCoerce = IOExts.unsafeCoerce\ +\n#endif" ++ fnl2 ()) ++ (if not usf.mldummy then mt () else str "__ = Prelude.error \"Logical or arity value used\"" ++ fnl2 ()) |
