GHC ext pragma in generated Haskell modules
authorhaftmann
Wed, 17 Dec 2008 12:10:40 +0100
changeset 29135 20b42397e293
parent 29134 9657871890c7
child 29137 295b35b7a202
GHC ext pragma in generated Haskell modules
src/Tools/code/code_haskell.ML
--- a/src/Tools/code/code_haskell.ML	Wed Dec 17 12:10:39 2008 +0100
+++ b/src/Tools/code/code_haskell.ML	Wed Dec 17 12:10:40 2008 +0100
@@ -414,7 +414,10 @@
                 o NameSpace.explode) modlname;
         val pathname = Path.append destination filename;
         val _ = File.mkdir (Path.dir pathname);
-      in File.write pathname (Code_Target.code_of_pretty content) end
+      in File.write pathname
+        ("{-# OPTIONS_GHC -fglasgow-exts #-}\n\n"
+          ^ Code_Target.code_of_pretty content)
+      end
   in
     Code_Target.mk_serialization target NONE
       (fn NONE => K () o map (Code_Target.code_writeln o snd) | SOME file => K () o map (write_module file))