From f81b974a4369814377d4a96c85daf48920bfc387 Mon Sep 17 00:00:00 2001
From: Herbert Valerio Riedel <hvr@gnu.org>
Date: Sun, 27 Oct 2013 10:37:28 +0100
Subject: [PATCH] Add more missing `{-# LANGUAGE #-}`s to `genprimopcode`
 output

This is a follow-up to 0620241a0f09d1ff865fa575eadb61aa59d2fe4f
which addressed only the `Prim.hs` output; this commit adds the missing
`LANGUAGE` pragmas for the generated `PrimopWrappers.hs` output as well.

While at it, the redundant `CPP` pragma is removed from the generated
`Prim.hs` file.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
---
 utils/genprimopcode/Main.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/genprimopcode/Main.hs b/utils/genprimopcode/Main.hs
index 382b43cd138c..d60081f6d3e9 100644
--- a/utils/genprimopcode/Main.hs
+++ b/utils/genprimopcode/Main.hs
@@ -244,7 +244,7 @@ gen_hs_source (Info defaults entries) =
         ++ "-- module directly.\n"
         ++ "--\n" 
         ++ "-----------------------------------------------------------------------------\n"
-        ++ "{-# LANGUAGE MultiParamTypeClasses #-}\n"
+        ++ "{-# LANGUAGE MagicHash, MultiParamTypeClasses, NoImplicitPrelude, UnboxedTuples #-}\n"
         ++ "module GHC.Prim (\n"
         ++ unlines (map (("\t" ++) . hdr) entries')
         ++ ") where\n"
@@ -649,7 +649,7 @@ gen_latex_doc (Info defaults entries)
 
 gen_wrappers :: Info -> String
 gen_wrappers (Info _ entries)
-   = "{-# LANGUAGE CPP, MagicHash, NoImplicitPrelude, UnboxedTuples #-}\n"
+   = "{-# LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples #-}\n"
         -- Dependencies on Prelude must be explicit in libraries/base, but we
         -- don't need the Prelude here so we add NoImplicitPrelude.
      ++ "module GHC.PrimopWrappers where\n" 
-- 
GitLab