[commit: ghc] master: Add more missing `{-# LANGUAGE #-}`s to `genprimopcode` output (f81b974)

git at git.haskell.org git at git.haskell.org
Sun Oct 27 09:46:20 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f81b974a4369814377d4a96c85daf48920bfc387/ghc

>---------------------------------------------------------------

commit f81b974a4369814377d4a96c85daf48920bfc387
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Oct 27 10:37:28 2013 +0100

    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 at gnu.org>


>---------------------------------------------------------------

f81b974a4369814377d4a96c85daf48920bfc387
 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 382b43c..d60081f 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" 



More information about the ghc-commits mailing list