From: simonpj@microsoft.com Date: Fri, 28 Jan 2011 12:07:19 +0000 (+0000) Subject: Use explicit language extensions & remove extension fields from base.cabal X-Git-Url: http://git.megacz.com/?p=ghc-base.git;a=commitdiff_plain;h=41e8fba828acbae1751628af50849f5352b27873 Use explicit language extensions & remove extension fields from base.cabal Add explicit {-# LANGUAGE xxx #-} pragmas to each module, that say what extensions that module uses. This makes it clearer where different extensions are used in the (large, variagated) base package. Now base.cabal doesn't need any extensions field Thanks to Bas van Dijk for doing all the work. --- diff --git a/Control/Applicative.hs b/Control/Applicative.hs index a7f7fe8..c38e580 100644 --- a/Control/Applicative.hs +++ b/Control/Applicative.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Applicative diff --git a/Control/Category.hs b/Control/Category.hs index ff63af5..b63fc67 100644 --- a/Control/Category.hs +++ b/Control/Category.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Category diff --git a/Control/Concurrent.hs b/Control/Concurrent.hs index d1b6875..514e2e9 100644 --- a/Control/Concurrent.hs +++ b/Control/Concurrent.hs @@ -1,4 +1,11 @@ +{-# LANGUAGE CPP + , ForeignFunctionInterface + , MagicHash + , UnboxedTuples + , ScopedTypeVariables + #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent diff --git a/Control/Concurrent/Chan.hs b/Control/Concurrent/Chan.hs index e06e0cb..2255c4e 100644 --- a/Control/Concurrent/Chan.hs +++ b/Control/Concurrent/Chan.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.Chan diff --git a/Control/Concurrent/MVar.hs b/Control/Concurrent/MVar.hs index b2b688a..9a95b8f 100644 --- a/Control/Concurrent/MVar.hs +++ b/Control/Concurrent/MVar.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.MVar diff --git a/Control/Concurrent/QSem.hs b/Control/Concurrent/QSem.hs index 8e8a301..22f6c0c 100644 --- a/Control/Concurrent/QSem.hs +++ b/Control/Concurrent/QSem.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.QSem diff --git a/Control/Concurrent/QSemN.hs b/Control/Concurrent/QSemN.hs index 7e43908..cfcff7f 100644 --- a/Control/Concurrent/QSemN.hs +++ b/Control/Concurrent/QSemN.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.QSemN diff --git a/Control/Concurrent/SampleVar.hs b/Control/Concurrent/SampleVar.hs index 7d1a00d..ca68a38 100644 --- a/Control/Concurrent/SampleVar.hs +++ b/Control/Concurrent/SampleVar.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.SampleVar diff --git a/Control/Exception.hs b/Control/Exception.hs index 578c2ee..03f6886 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ExistentialQuantification #-} ----------------------------------------------------------------------------- -- | diff --git a/Control/Exception/Base.hs b/Control/Exception/Base.hs index fb4f6de..cb5321b 100644 --- a/Control/Exception/Base.hs +++ b/Control/Exception/Base.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} #include "Typeable.h" diff --git a/Control/Monad.hs b/Control/Monad.hs index bf94ad4..2bbfc57 100644 --- a/Control/Monad.hs +++ b/Control/Monad.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Monad diff --git a/Control/Monad/Fix.hs b/Control/Monad/Fix.hs index e8ba03d..a1309fa 100644 --- a/Control/Monad/Fix.hs +++ b/Control/Monad/Fix.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Fix diff --git a/Control/Monad/ST.hs b/Control/Monad/ST.hs index 8ebb750..397b072 100644 --- a/Control/Monad/ST.hs +++ b/Control/Monad/ST.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST diff --git a/Control/Monad/ST/Lazy.hs b/Control/Monad/ST/Lazy.hs index 657752e..8aac665 100644 --- a/Control/Monad/ST/Lazy.hs +++ b/Control/Monad/ST/Lazy.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, MagicHash, UnboxedTuples, Rank2Types #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST.Lazy diff --git a/Control/OldException.hs b/Control/OldException.hs index 4fa787f..0284899 100644 --- a/Control/OldException.hs +++ b/Control/OldException.hs @@ -1,4 +1,8 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , ForeignFunctionInterface + , ExistentialQuantification + #-} #include "Typeable.h" diff --git a/Data/Bits.hs b/Data/Bits.hs index c9230c5..cbf7b37 100644 --- a/Data/Bits.hs +++ b/Data/Bits.hs @@ -1,5 +1,5 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Bits diff --git a/Data/Bool.hs b/Data/Bool.hs index 10ca90a..ba2d8ae 100644 --- a/Data/Bool.hs +++ b/Data/Bool.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Bool diff --git a/Data/Char.hs b/Data/Char.hs index f9cbbdf..40052a7 100644 --- a/Data/Char.hs +++ b/Data/Char.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Char diff --git a/Data/Complex.hs b/Data/Complex.hs index 6965547..9765eda 100644 --- a/Data/Complex.hs +++ b/Data/Complex.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, DeriveDataTypeable #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Complex diff --git a/Data/Data.hs b/Data/Data.hs index 08bc68a..d9cab7a 100644 --- a/Data/Data.hs +++ b/Data/Data.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, Rank2Types, ScopedTypeVariables #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Data diff --git a/Data/Dynamic.hs b/Data/Dynamic.hs index 9b007d4..b83bbfa 100644 --- a/Data/Dynamic.hs +++ b/Data/Dynamic.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Dynamic diff --git a/Data/Either.hs b/Data/Either.hs index fd6651f..1c12897 100644 --- a/Data/Either.hs +++ b/Data/Either.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Either diff --git a/Data/Eq.hs b/Data/Eq.hs index 7e424a2..e7b99f1 100644 --- a/Data/Eq.hs +++ b/Data/Eq.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Eq diff --git a/Data/Fixed.hs b/Data/Fixed.hs index 98d212d..cd44092 100644 --- a/Data/Fixed.hs +++ b/Data/Fixed.hs @@ -1,5 +1,9 @@ +{-# LANGUAGE CPP #-} {-# OPTIONS -Wall -fno-warn-unused-binds #-} +#ifndef __NHC__ +{-# LANGUAGE DeriveDataTypeable #-} +#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Fixed diff --git a/Data/Foldable.hs b/Data/Foldable.hs index d07bebe..354bd8b 100644 --- a/Data/Foldable.hs +++ b/Data/Foldable.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Foldable diff --git a/Data/Functor.hs b/Data/Functor.hs index e5b8166..84d0aa7 100644 --- a/Data/Functor.hs +++ b/Data/Functor.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Functor diff --git a/Data/HashTable.hs b/Data/HashTable.hs index c407abf..e96160a 100644 --- a/Data/HashTable.hs +++ b/Data/HashTable.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields -fno-warn-name-shadowing #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} +{-# OPTIONS_GHC -funbox-strict-fields -fno-warn-name-shadowing #-} ----------------------------------------------------------------------------- -- | diff --git a/Data/IORef.hs b/Data/IORef.hs index f885751..a6f29e7 100644 --- a/Data/IORef.hs +++ b/Data/IORef.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.IORef diff --git a/Data/Int.hs b/Data/Int.hs index 67b4ba8..c9c9036 100644 --- a/Data/Int.hs +++ b/Data/Int.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Int diff --git a/Data/Ix.hs b/Data/Ix.hs index fda6d58..a01e516 100644 --- a/Data/Ix.hs +++ b/Data/Ix.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Ix diff --git a/Data/List.hs b/Data/List.hs index 0e4e621..061ad42 100644 --- a/Data/List.hs +++ b/Data/List.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.List diff --git a/Data/Maybe.hs b/Data/Maybe.hs index 981d028..b96efa7 100644 --- a/Data/Maybe.hs +++ b/Data/Maybe.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Maybe diff --git a/Data/Monoid.hs b/Data/Monoid.hs index b3233ba..aaefd42 100644 --- a/Data/Monoid.hs +++ b/Data/Monoid.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Monoid diff --git a/Data/Ord.hs b/Data/Ord.hs index 9af4246..fd291ae 100644 --- a/Data/Ord.hs +++ b/Data/Ord.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Ord diff --git a/Data/Ratio.hs b/Data/Ratio.hs index d64297f..f044099 100644 --- a/Data/Ratio.hs +++ b/Data/Ratio.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Ratio diff --git a/Data/STRef.hs b/Data/STRef.hs index 288cbe7..5002ee7 100644 --- a/Data/STRef.hs +++ b/Data/STRef.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.STRef diff --git a/Data/String.hs b/Data/String.hs index c2dc17e..dae81a2 100644 --- a/Data/String.hs +++ b/Data/String.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, FlexibleInstances #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.String diff --git a/Data/Traversable.hs b/Data/Traversable.hs index af04e51..2bdc1bc 100644 --- a/Data/Traversable.hs +++ b/Data/Traversable.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Traversable diff --git a/Data/Tuple.hs b/Data/Tuple.hs index 6921a21..a5ea875 100644 --- a/Data/Tuple.hs +++ b/Data/Tuple.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- XXX -fno-warn-unused-imports needed for the GHC.Tuple import below. Sigh. ----------------------------------------------------------------------------- diff --git a/Data/Typeable.hs b/Data/Typeable.hs index e606294..804e853 100644 --- a/Data/Typeable.hs +++ b/Data/Typeable.hs @@ -1,4 +1,11 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -XOverlappingInstances -funbox-strict-fields #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , OverlappingInstances + , ScopedTypeVariables + , ForeignFunctionInterface + , FlexibleInstances + #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} -- The -XOverlappingInstances flag allows the user to over-ride -- the instances for Typeable given here. In particular, we provide an instance diff --git a/Data/Typeable.hs-boot b/Data/Typeable.hs-boot index 9da3620..da6142e 100644 --- a/Data/Typeable.hs-boot +++ b/Data/Typeable.hs-boot @@ -1,5 +1,4 @@ - -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module Data.Typeable where diff --git a/Data/Unique.hs b/Data/Unique.hs index ab3d647..c4c8827 100644 --- a/Data/Unique.hs +++ b/Data/Unique.hs @@ -1,3 +1,9 @@ +{-# LANGUAGE CPP #-} + +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE MagicHash, DeriveDataTypeable #-} +#endif + ----------------------------------------------------------------------------- -- | -- Module : Data.Unique diff --git a/Data/Version.hs b/Data/Version.hs index ef9c07d..7d7d329 100644 --- a/Data/Version.hs +++ b/Data/Version.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, DeriveDataTypeable #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Version diff --git a/Data/Word.hs b/Data/Word.hs index c4bf0a6..18300d2 100644 --- a/Data/Word.hs +++ b/Data/Word.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Word diff --git a/Debug/Trace.hs b/Debug/Trace.hs index 742044e..ebacb6c 100644 --- a/Debug/Trace.hs +++ b/Debug/Trace.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : Debug.Trace diff --git a/Foreign.hs b/Foreign.hs index 5976c20..a26ffaf 100644 --- a/Foreign.hs +++ b/Foreign.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign diff --git a/Foreign/C.hs b/Foreign/C.hs index cb8dfef..2c7fd2e 100644 --- a/Foreign/C.hs +++ b/Foreign/C.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.C diff --git a/Foreign/C/Error.hs b/Foreign/C/Error.hs index 8d149c1..89c736d 100644 --- a/Foreign/C/Error.hs +++ b/Foreign/C/Error.hs @@ -1,4 +1,6 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -#include "HsBase.h" #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} +{-# OPTIONS_GHC -#include "HsBase.h" #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.Error diff --git a/Foreign/C/String.hs b/Foreign/C/String.hs index 680c81a..becfa4e 100644 --- a/Foreign/C/String.hs +++ b/Foreign/C/String.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.String diff --git a/Foreign/C/Types.hs b/Foreign/C/Types.hs index e30a2ba..22bae5c 100644 --- a/Foreign/C/Types.hs +++ b/Foreign/C/Types.hs @@ -1,7 +1,12 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , MagicHash + , GeneralizedNewtypeDeriving + #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- XXX -fno-warn-unused-binds stops us warning about unused constructors, -- but really we should just remove them if we don't want them + ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.Types diff --git a/Foreign/Concurrent.hs b/Foreign/Concurrent.hs index a914d95..e0f2faa 100644 --- a/Foreign/Concurrent.hs +++ b/Foreign/Concurrent.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Concurrent diff --git a/Foreign/ForeignPtr.hs b/Foreign/ForeignPtr.hs index a824914..b91ffeb 100644 --- a/Foreign/ForeignPtr.hs +++ b/Foreign/ForeignPtr.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.ForeignPtr diff --git a/Foreign/Marshal.hs b/Foreign/Marshal.hs index 2c16c01..77a4ebf 100644 --- a/Foreign/Marshal.hs +++ b/Foreign/Marshal.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal diff --git a/Foreign/Marshal/Alloc.hs b/Foreign/Marshal/Alloc.hs index 5c86155..ddb4a90 100644 --- a/Foreign/Marshal/Alloc.hs +++ b/Foreign/Marshal/Alloc.hs @@ -1,4 +1,10 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , MagicHash + , UnboxedTuples + , ForeignFunctionInterface + #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Alloc diff --git a/Foreign/Marshal/Array.hs b/Foreign/Marshal/Array.hs index 9e8d082..1ca3e9e 100644 --- a/Foreign/Marshal/Array.hs +++ b/Foreign/Marshal/Array.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Array diff --git a/Foreign/Marshal/Error.hs b/Foreign/Marshal/Error.hs index b018f2a..ccf514d 100644 --- a/Foreign/Marshal/Error.hs +++ b/Foreign/Marshal/Error.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Error diff --git a/Foreign/Marshal/Pool.hs b/Foreign/Marshal/Pool.hs index f15d048..ed94e46 100644 --- a/Foreign/Marshal/Pool.hs +++ b/Foreign/Marshal/Pool.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + -------------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Pool diff --git a/Foreign/Marshal/Utils.hs b/Foreign/Marshal/Utils.hs index 7fcacfa..5ae677a 100644 --- a/Foreign/Marshal/Utils.hs +++ b/Foreign/Marshal/Utils.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Utils diff --git a/Foreign/Ptr.hs b/Foreign/Ptr.hs index 8dd220f..b46acc1 100644 --- a/Foreign/Ptr.hs +++ b/Foreign/Ptr.hs @@ -1,4 +1,10 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , ForeignFunctionInterface + , MagicHash + , GeneralizedNewtypeDeriving + #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Ptr diff --git a/Foreign/StablePtr.hs b/Foreign/StablePtr.hs index cfcd239..522c6fc 100644 --- a/Foreign/StablePtr.hs +++ b/Foreign/StablePtr.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.StablePtr diff --git a/Foreign/Storable.hs b/Foreign/Storable.hs index 0b0ad0c..700a4ff 100644 --- a/Foreign/Storable.hs +++ b/Foreign/Storable.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Storable diff --git a/GHC/Arr.lhs b/GHC/Arr.lhs index b9ce6b7..fd858b1 100644 --- a/GHC/Arr.lhs +++ b/GHC/Arr.lhs @@ -1,7 +1,8 @@ \begin{code} +{-# LANGUAGE NoImplicitPrelude, NoBangPatterns, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -{-# LANGUAGE NoImplicitPrelude, NoBangPatterns #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Arr diff --git a/GHC/Base.lhs b/GHC/Base.lhs index 5ab0b26..be1b57b 100644 --- a/GHC/Base.lhs +++ b/GHC/Base.lhs @@ -62,12 +62,20 @@ GHC.Float Classes: Floating, RealFloat Other Prelude modules are much easier with fewer complex dependencies. \begin{code} -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , BangPatterns + , ExplicitForAll + , MagicHash + , UnboxedTuples + , ExistentialQuantification + , Rank2Types + #-} -- -fno-warn-orphans is needed for things like: -- Orphan rule: "x# -# x#" ALWAYS forall x# :: Int# -# x# x# = 0 {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Base diff --git a/GHC/Classes.hs b/GHC/Classes.hs index 2934d1d..17d0f93 100644 --- a/GHC/Classes.hs +++ b/GHC/Classes.hs @@ -1,5 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- XXX -fno-warn-unused-imports needed for the GHC.Tuple import below. Sigh. {-# OPTIONS_HADDOCK hide #-} diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index b12785f..665f82f 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -1,7 +1,8 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_HADDOCK not-home #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Conc diff --git a/GHC/Conc/IO.hs b/GHC/Conc/IO.hs index ca75894..fc80026 100644 --- a/GHC/Conc/IO.hs +++ b/GHC/Conc/IO.hs @@ -1,6 +1,12 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , MagicHash + , UnboxedTuples + , ForeignFunctionInterface + #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_HADDOCK not-home #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Conc.IO diff --git a/GHC/Conc/Signal.hs b/GHC/Conc/Signal.hs index 6d300c6..851c4bb 100644 --- a/GHC/Conc/Signal.hs +++ b/GHC/Conc/Signal.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, ForeignFunctionInterface #-} module GHC.Conc.Signal ( Signal diff --git a/GHC/Conc/Sync.lhs b/GHC/Conc/Sync.lhs index 0808e68..b4de53a 100644 --- a/GHC/Conc/Sync.lhs +++ b/GHC/Conc/Sync.lhs @@ -1,8 +1,16 @@ \begin{code} -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , BangPatterns + , MagicHash + , UnboxedTuples + , UnliftedFFITypes + , ForeignFunctionInterface + , DeriveDataTypeable + #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_HADDOCK not-home #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Conc.Sync diff --git a/GHC/Conc/Windows.hs b/GHC/Conc/Windows.hs index b750185..96f034c 100644 --- a/GHC/Conc/Windows.hs +++ b/GHC/Conc/Windows.hs @@ -1,6 +1,7 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_HADDOCK not-home #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Conc.Windows diff --git a/GHC/ConsoleHandler.hs b/GHC/ConsoleHandler.hs index eb5f36a..223a2bb 100644 --- a/GHC/ConsoleHandler.hs +++ b/GHC/ConsoleHandler.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -cpp #-} +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.ConsoleHandler diff --git a/GHC/Constants.hs b/GHC/Constants.hs index 3df2d96..871829d 100644 --- a/GHC/Constants.hs +++ b/GHC/Constants.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} module GHC.Constants where diff --git a/GHC/Desugar.hs b/GHC/Desugar.hs index eaa15dc..65dd645 100644 --- a/GHC/Desugar.hs +++ b/GHC/Desugar.hs @@ -1,3 +1,9 @@ +{-# LANGUAGE CPP + , NoImplicitPrelude + , Rank2Types + , ExistentialQuantification + #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Desugar diff --git a/GHC/Enum.lhs b/GHC/Enum.lhs index 7cb6f07..ac6e9a9 100644 --- a/GHC/Enum.lhs +++ b/GHC/Enum.lhs @@ -1,6 +1,5 @@ \begin{code} -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, BangPatterns, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/Environment.hs b/GHC/Environment.hs index 4b9b0a1..60325b3 100644 --- a/GHC/Environment.hs +++ b/GHC/Environment.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE ForeignFunctionInterface #-} module GHC.Environment (getFullArgs) where diff --git a/GHC/Err.lhs b/GHC/Err.lhs index 9a94ce0..90142f4 100644 --- a/GHC/Err.lhs +++ b/GHC/Err.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Err diff --git a/GHC/Err.lhs-boot b/GHC/Err.lhs-boot index 9bef80d..932f699 100644 --- a/GHC/Err.lhs-boot +++ b/GHC/Err.lhs-boot @@ -1,5 +1,6 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} + --------------------------------------------------------------------------- -- Ghc.Err.hs-boot --------------------------------------------------------------------------- diff --git a/GHC/Exception.lhs b/GHC/Exception.lhs index 4dce281..c5b9679 100644 --- a/GHC/Exception.lhs +++ b/GHC/Exception.lhs @@ -1,5 +1,9 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude + , ExistentialQuantification + , MagicHash + , DeriveDataTypeable + #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/Exts.hs b/GHC/Exts.hs index ea4b8ff..81a9dbb 100644 --- a/GHC/Exts.hs +++ b/GHC/Exts.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, DeriveDataTypeable #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Exts diff --git a/GHC/Float.lhs b/GHC/Float.lhs index a353cc6..02aba8c 100644 --- a/GHC/Float.lhs +++ b/GHC/Float.lhs @@ -1,9 +1,15 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , MagicHash + , UnboxedTuples + , ForeignFunctionInterface + #-} -- We believe we could deorphan this module, by moving lots of things -- around, but we haven't got there yet: {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Float diff --git a/GHC/ForeignPtr.hs b/GHC/ForeignPtr.hs index a20b000..2e737f0 100644 --- a/GHC/ForeignPtr.hs +++ b/GHC/ForeignPtr.hs @@ -1,6 +1,11 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , BangPatterns + , MagicHash + , UnboxedTuples + #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.ForeignPtr diff --git a/GHC/IO.hs b/GHC/IO.hs index d5272ba..9fa7299 100644 --- a/GHC/IO.hs +++ b/GHC/IO.hs @@ -1,5 +1,10 @@ +{-# LANGUAGE NoImplicitPrelude + , BangPatterns + , RankNTypes + , MagicHash + , UnboxedTuples + #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -{-# LANGUAGE NoImplicitPrelude, BangPatterns, RankNTypes #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/IO.hs-boot b/GHC/IO.hs-boot index 703fad5..8bd5265 100644 --- a/GHC/IO.hs-boot +++ b/GHC/IO.hs-boot @@ -1,3 +1,5 @@ +{-# LANGUAGE NoImplicitPrelude #-} + module GHC.IO where import GHC.Types diff --git a/GHC/IO/Buffer.hs b/GHC/IO/Buffer.hs index b72eaf2..c019d69 100644 --- a/GHC/IO/Buffer.hs +++ b/GHC/IO/Buffer.hs @@ -1,4 +1,6 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Buffer diff --git a/GHC/IO/BufferedIO.hs b/GHC/IO/BufferedIO.hs index 584f5a7..874a02d 100644 --- a/GHC/IO/BufferedIO.hs +++ b/GHC/IO/BufferedIO.hs @@ -1,4 +1,6 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.BufferedIO diff --git a/GHC/IO/Device.hs b/GHC/IO/Device.hs index 8f907d5..bc772b8 100644 --- a/GHC/IO/Device.hs +++ b/GHC/IO/Device.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Device diff --git a/GHC/IO/Encoding.hs b/GHC/IO/Encoding.hs index 44cdd86..9f56966 100644 --- a/GHC/IO/Encoding.hs +++ b/GHC/IO/Encoding.hs @@ -1,4 +1,6 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding diff --git a/GHC/IO/Encoding/CodePage.hs b/GHC/IO/Encoding/CodePage.hs index 17c1615..34bc0db 100644 --- a/GHC/IO/Encoding/CodePage.hs +++ b/GHC/IO/Encoding/CodePage.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP, BangPatterns #-} module GHC.IO.Encoding.CodePage( #if !defined(mingw32_HOST_OS) ) where diff --git a/GHC/IO/Encoding/Iconv.hs b/GHC/IO/Encoding/Iconv.hs index faf58e9..0316698 100644 --- a/GHC/IO/Encoding/Iconv.hs +++ b/GHC/IO/Encoding/Iconv.hs @@ -1,4 +1,9 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , ForeignFunctionInterface + , NondecreasingIndentation + #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding.Iconv diff --git a/GHC/IO/Encoding/Latin1.hs b/GHC/IO/Encoding/Latin1.hs index 5bdf608..6bf18c8 100644 --- a/GHC/IO/Encoding/Latin1.hs +++ b/GHC/IO/Encoding/Latin1.hs @@ -1,5 +1,9 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} -{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE NoImplicitPrelude + , BangPatterns + , NondecreasingIndentation + #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding.Latin1 diff --git a/GHC/IO/Encoding/Types.hs b/GHC/IO/Encoding/Types.hs index 640ea88..caffa24 100644 --- a/GHC/IO/Encoding/Types.hs +++ b/GHC/IO/Encoding/Types.hs @@ -1,4 +1,6 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE NoImplicitPrelude, ExistentialQuantification #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding.Types diff --git a/GHC/IO/Encoding/UTF16.hs b/GHC/IO/Encoding/UTF16.hs index bb38a79..c3b3847 100644 --- a/GHC/IO/Encoding/UTF16.hs +++ b/GHC/IO/Encoding/UTF16.hs @@ -1,5 +1,11 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} -{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , BangPatterns + , NondecreasingIndentation + , MagicHash + #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding.UTF16 diff --git a/GHC/IO/Encoding/UTF32.hs b/GHC/IO/Encoding/UTF32.hs index 685bdaf..1eef105 100644 --- a/GHC/IO/Encoding/UTF32.hs +++ b/GHC/IO/Encoding/UTF32.hs @@ -1,5 +1,10 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} -{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE NoImplicitPrelude + , BangPatterns + , NondecreasingIndentation + , MagicHash + #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding.UTF32 diff --git a/GHC/IO/Encoding/UTF8.hs b/GHC/IO/Encoding/UTF8.hs index 1cf8092..dea4fde 100644 --- a/GHC/IO/Encoding/UTF8.hs +++ b/GHC/IO/Encoding/UTF8.hs @@ -1,5 +1,10 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} -{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE NoImplicitPrelude + , BangPatterns + , NondecreasingIndentation + , MagicHash + #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding.UTF8 diff --git a/GHC/IO/Exception.hs b/GHC/IO/Exception.hs index 219047a..4134fca 100644 --- a/GHC/IO/Exception.hs +++ b/GHC/IO/Exception.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE NoImplicitPrelude, DeriveDataTypeable, MagicHash #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/IO/Exception.hs-boot b/GHC/IO/Exception.hs-boot index f1ba724..d094ef2 100644 --- a/GHC/IO/Exception.hs-boot +++ b/GHC/IO/Exception.hs-boot @@ -1,4 +1,4 @@ -{-# OPTIONS -fno-implicit-prelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module GHC.IO.Exception where import GHC.Base diff --git a/GHC/IO/FD.hs b/GHC/IO/FD.hs index f2ce275..b5392d4 100644 --- a/GHC/IO/FD.hs +++ b/GHC/IO/FD.hs @@ -1,6 +1,13 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns -fno-warn-identities #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , BangPatterns + , ForeignFunctionInterface + , DeriveDataTypeable + #-} +{-# OPTIONS_GHC -fno-warn-identities #-} -- Whether there are identities depends on the platform {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.FD diff --git a/GHC/IO/Handle.hs b/GHC/IO/Handle.hs index a2273ee..f42fd55 100644 --- a/GHC/IO/Handle.hs +++ b/GHC/IO/Handle.hs @@ -1,5 +1,9 @@ +{-# LANGUAGE CPP + , NoImplicitPrelude + , RecordWildCards + , NondecreasingIndentation + #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -{-# LANGUAGE NoImplicitPrelude, RecordWildCards #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/IO/Handle.hs-boot b/GHC/IO/Handle.hs-boot index 68379e2..d925f08 100644 --- a/GHC/IO/Handle.hs-boot +++ b/GHC/IO/Handle.hs-boot @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module GHC.IO.Handle where diff --git a/GHC/IO/Handle/FD.hs b/GHC/IO/Handle/FD.hs index 0ef0cea..fd188a8 100644 --- a/GHC/IO/Handle/FD.hs +++ b/GHC/IO/Handle/FD.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, PatternGuards #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Handle.FD diff --git a/GHC/IO/Handle/FD.hs-boot b/GHC/IO/Handle/FD.hs-boot index 657af38..2d84884 100644 --- a/GHC/IO/Handle/FD.hs-boot +++ b/GHC/IO/Handle/FD.hs-boot @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module GHC.IO.Handle.FD where import GHC.IO.Handle.Types diff --git a/GHC/IO/Handle/Internals.hs b/GHC/IO/Handle/Internals.hs index 76e8b00..6409bbd 100644 --- a/GHC/IO/Handle/Internals.hs +++ b/GHC/IO/Handle/Internals.hs @@ -1,7 +1,13 @@ +{-# LANGUAGE NoImplicitPrelude + , RecordWildCards + , BangPatterns + , PatternGuards + , NondecreasingIndentation + , Rank2Types + #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_HADDOCK hide #-} -{-# LANGUAGE NoImplicitPrelude, RecordWildCards, BangPatterns #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/IO/Handle/Text.hs b/GHC/IO/Handle/Text.hs index e481efd..160e9d7 100644 --- a/GHC/IO/Handle/Text.hs +++ b/GHC/IO/Handle/Text.hs @@ -1,7 +1,15 @@ +{-# LANGUAGE CPP + , NoImplicitPrelude + , RecordWildCards + , BangPatterns + , PatternGuards + , NondecreasingIndentation + , MagicHash + , ForeignFunctionInterface + #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} {-# OPTIONS_HADDOCK hide #-} -{-# LANGUAGE NoImplicitPrelude, RecordWildCards, BangPatterns #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/IO/Handle/Types.hs b/GHC/IO/Handle/Types.hs index 766c027..bff4681 100644 --- a/GHC/IO/Handle/Types.hs +++ b/GHC/IO/Handle/Types.hs @@ -1,5 +1,11 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , ExistentialQuantification + , DeriveDataTypeable + #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Handle.Types diff --git a/GHC/IO/IOMode.hs b/GHC/IO/IOMode.hs index 606f24f..3b0943c 100644 --- a/GHC/IO/IOMode.hs +++ b/GHC/IO/IOMode.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/IOArray.hs b/GHC/IOArray.hs index 35638ff..67ee014 100644 --- a/GHC/IOArray.hs +++ b/GHC/IOArray.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/IOBase.hs b/GHC/IOBase.hs index c80756a..4177b07 100644 --- a/GHC/IOBase.hs +++ b/GHC/IOBase.hs @@ -1,4 +1,6 @@ +{-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IOBase diff --git a/GHC/IORef.hs b/GHC/IORef.hs index 51466bc..be2808d 100644 --- a/GHC/IORef.hs +++ b/GHC/IORef.hs @@ -1,5 +1,7 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IORef diff --git a/GHC/Int.hs b/GHC/Int.hs index 03d488e..05d10c5 100644 --- a/GHC/Int.hs +++ b/GHC/Int.hs @@ -1,5 +1,4 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/List.lhs b/GHC/List.lhs index fe67502..ff8593c 100644 --- a/GHC/List.lhs +++ b/GHC/List.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.List diff --git a/GHC/MVar.hs b/GHC/MVar.hs index 348ae51..8c653dc 100644 --- a/GHC/MVar.hs +++ b/GHC/MVar.hs @@ -1,5 +1,7 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.MVar diff --git a/GHC/Num.lhs b/GHC/Num.lhs index 5a94949..5dc5e75 100644 --- a/GHC/Num.lhs +++ b/GHC/Num.lhs @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-} -- We believe we could deorphan this module, by moving lots of things -- around, but we haven't got there yet: {-# OPTIONS_GHC -fno-warn-orphans #-} diff --git a/GHC/PArr.hs b/GHC/PArr.hs index c9b5f9b..6a5328f 100644 --- a/GHC/PArr.hs +++ b/GHC/PArr.hs @@ -1,6 +1,6 @@ +{-# LANGUAGE CPP, ParallelArrays, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} -{-# LANGUAGE ParallelArrays #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/Pack.lhs b/GHC/Pack.lhs index f3e9609..14ac670 100644 --- a/GHC/Pack.lhs +++ b/GHC/Pack.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Pack diff --git a/GHC/Ptr.lhs b/GHC/Ptr.lhs index 2ba743d..bf78f71 100644 --- a/GHC/Ptr.lhs +++ b/GHC/Ptr.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Ptr diff --git a/GHC/Read.lhs b/GHC/Read.lhs index 1a7b6a8..77daece 100644 --- a/GHC/Read.lhs +++ b/GHC/Read.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Read diff --git a/GHC/Real.lhs b/GHC/Real.lhs index 68e3784..be2a296 100644 --- a/GHC/Real.lhs +++ b/GHC/Real.lhs @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/ST.lhs b/GHC/ST.lhs index e3e24bf..dc62000 100644 --- a/GHC/ST.lhs +++ b/GHC/ST.lhs @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples, Rank2Types #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/GHC/STRef.lhs b/GHC/STRef.lhs index a0dba8d..9306b24 100644 --- a/GHC/STRef.lhs +++ b/GHC/STRef.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.STRef diff --git a/GHC/Show.lhs b/GHC/Show.lhs index 2c673a8..6cb8bf3 100644 --- a/GHC/Show.lhs +++ b/GHC/Show.lhs @@ -1,7 +1,7 @@ \begin{code} -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, BangPatterns, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Show diff --git a/GHC/Show.lhs-boot b/GHC/Show.lhs-boot index b01d165..6c5fa61 100644 --- a/GHC/Show.lhs-boot +++ b/GHC/Show.lhs-boot @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module GHC.Show (showSignedInt) where diff --git a/GHC/Stable.lhs b/GHC/Stable.lhs index 6bac7d1..e96bf68 100644 --- a/GHC/Stable.lhs +++ b/GHC/Stable.lhs @@ -1,6 +1,11 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude + , MagicHash + , UnboxedTuples + , ForeignFunctionInterface + #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Stable diff --git a/GHC/Storable.lhs b/GHC/Storable.lhs index 982230c..a722873 100644 --- a/GHC/Storable.lhs +++ b/GHC/Storable.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Storable diff --git a/GHC/TopHandler.lhs b/GHC/TopHandler.lhs index 0f55b38..7bedcfe 100644 --- a/GHC/TopHandler.lhs +++ b/GHC/TopHandler.lhs @@ -1,7 +1,14 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , ForeignFunctionInterface + , MagicHash + , UnboxedTuples + , PatternGuards + #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.TopHandler diff --git a/GHC/Unicode.hs b/GHC/Unicode.hs index baca833..b34f677 100644 --- a/GHC/Unicode.hs +++ b/GHC/Unicode.hs @@ -1,6 +1,7 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} {-# OPTIONS -#include "WCsubst.h" #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Unicode diff --git a/GHC/Unicode.hs-boot b/GHC/Unicode.hs-boot index 6a0e75c..cc67dbb 100644 --- a/GHC/Unicode.hs-boot +++ b/GHC/Unicode.hs-boot @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module GHC.Unicode where diff --git a/GHC/Weak.lhs b/GHC/Weak.lhs index af44c88..67046f8 100644 --- a/GHC/Weak.lhs +++ b/GHC/Weak.lhs @@ -1,7 +1,12 @@ \begin{code} -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , BangPatterns + , MagicHash + , UnboxedTuples + #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Weak diff --git a/GHC/Word.hs b/GHC/Word.hs index 9a6355c..9d3e1a6 100644 --- a/GHC/Word.hs +++ b/GHC/Word.hs @@ -1,6 +1,6 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Word diff --git a/NHC/PosixTypes.hsc b/NHC/PosixTypes.hsc index 64c3e28..efae04e 100644 --- a/NHC/PosixTypes.hsc +++ b/NHC/PosixTypes.hsc @@ -1,4 +1,6 @@ +{-# LANGUAGE CPP #-} {-# OPTIONS_NHC98 -I/usr/include #-} + ----------------------------------------------------------------------------- -- | -- Module : NHC.PosixTypes diff --git a/Numeric.hs b/Numeric.hs index d6dcdfe..4b202d0 100644 --- a/Numeric.hs +++ b/Numeric.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Numeric diff --git a/Prelude.hs b/Prelude.hs index 8ede773..4c183ae 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns #-} + ----------------------------------------------------------------------------- -- | -- Module : Prelude diff --git a/System/CPUTime.hsc b/System/CPUTime.hsc index f050a68..a25c750 100644 --- a/System/CPUTime.hsc +++ b/System/CPUTime.hsc @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, NondecreasingIndentation, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : System.CPUTime diff --git a/System/Environment.hs b/System/Environment.hs index b85bc42..2b6dec2 100644 --- a/System/Environment.hs +++ b/System/Environment.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Environment diff --git a/System/Event/Clock.hsc b/System/Event/Clock.hsc index 73d2a52..ae31a7b 100644 --- a/System/Event/Clock.hsc +++ b/System/Event/Clock.hsc @@ -1,5 +1,4 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE NoImplicitPrelude, BangPatterns, ForeignFunctionInterface #-} module System.Event.Clock (getCurrentTime) where diff --git a/System/Event/Control.hs b/System/Event/Control.hs index 167eb77..635d864 100644 --- a/System/Event/Control.hs +++ b/System/Event/Control.hs @@ -1,5 +1,9 @@ -{-# LANGUAGE CPP, ForeignFunctionInterface, NoImplicitPrelude, - ScopedTypeVariables, BangPatterns #-} +{-# LANGUAGE CPP + , ForeignFunctionInterface + , NoImplicitPrelude + , ScopedTypeVariables + , BangPatterns + #-} module System.Event.Control ( diff --git a/System/Event/EPoll.hsc b/System/Event/EPoll.hsc index ccc8ec0..b2311c8 100644 --- a/System/Event/EPoll.hsc +++ b/System/Event/EPoll.hsc @@ -1,5 +1,9 @@ -{-# LANGUAGE ForeignFunctionInterface, GeneralizedNewtypeDeriving, - NoImplicitPrelude, BangPatterns #-} +{-# LANGUAGE CPP + , ForeignFunctionInterface + , GeneralizedNewtypeDeriving + , NoImplicitPrelude + , BangPatterns + #-} -- -- | A binding to the epoll I/O event notification facility diff --git a/System/Event/IntMap.hs b/System/Event/IntMap.hs index f02628b..61ae002 100644 --- a/System/Event/IntMap.hs +++ b/System/Event/IntMap.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP, MagicHash, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Event.IntMap diff --git a/System/Event/KQueue.hsc b/System/Event/KQueue.hsc index 4cf6a5d..4a86435 100644 --- a/System/Event/KQueue.hsc +++ b/System/Event/KQueue.hsc @@ -1,5 +1,10 @@ -{-# LANGUAGE ForeignFunctionInterface, GeneralizedNewtypeDeriving, - NoImplicitPrelude, RecordWildCards, BangPatterns #-} +{-# LANGUAGE CPP + , ForeignFunctionInterface + , GeneralizedNewtypeDeriving + , NoImplicitPrelude + , RecordWildCards + , BangPatterns + #-} module System.Event.KQueue ( diff --git a/System/Event/Manager.hs b/System/Event/Manager.hs index 0c8293f..9766774 100644 --- a/System/Event/Manager.hs +++ b/System/Event/Manager.hs @@ -1,5 +1,12 @@ -{-# LANGUAGE BangPatterns, CPP, ExistentialQuantification, NoImplicitPrelude, - RecordWildCards, TypeSynonymInstances #-} +{-# LANGUAGE BangPatterns + , CPP + , ExistentialQuantification + , NoImplicitPrelude + , RecordWildCards + , TypeSynonymInstances + , FlexibleInstances + #-} + module System.Event.Manager ( -- * Types EventManager diff --git a/System/Event/Poll.hsc b/System/Event/Poll.hsc index d6929f8..323ab9c 100644 --- a/System/Event/Poll.hsc +++ b/System/Event/Poll.hsc @@ -1,5 +1,9 @@ -{-# LANGUAGE ForeignFunctionInterface, GeneralizedNewtypeDeriving, - NoImplicitPrelude, BangPatterns #-} +{-# LANGUAGE CPP + , ForeignFunctionInterface + , GeneralizedNewtypeDeriving + , NoImplicitPrelude + , BangPatterns + #-} module System.Event.Poll ( diff --git a/System/Exit.hs b/System/Exit.hs index 7cca017..7eb17cf 100644 --- a/System/Exit.hs +++ b/System/Exit.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Exit diff --git a/System/IO.hs b/System/IO.hs index d52c2c9..f60ecad 100644 --- a/System/IO.hs +++ b/System/IO.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : System.IO diff --git a/System/IO/Error.hs b/System/IO/Error.hs index d1c4e47..a5aba92 100644 --- a/System/IO/Error.hs +++ b/System/IO/Error.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | diff --git a/System/IO/Unsafe.hs b/System/IO/Unsafe.hs index 05f2c7b..3ef3d9f 100644 --- a/System/IO/Unsafe.hs +++ b/System/IO/Unsafe.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : System.IO.Unsafe diff --git a/System/Info.hs b/System/Info.hs index b38aea2..92da1a6 100644 --- a/System/Info.hs +++ b/System/Info.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Info diff --git a/System/Mem.hs b/System/Mem.hs index 39a98da..af96b5d 100644 --- a/System/Mem.hs +++ b/System/Mem.hs @@ -1,3 +1,9 @@ +{-# LANGUAGE CPP #-} + +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE ForeignFunctionInterface #-} +#endif + ----------------------------------------------------------------------------- -- | -- Module : System.Mem diff --git a/System/Mem/StableName.hs b/System/Mem/StableName.hs index beeb514..d7d27a3 100644 --- a/System/Mem/StableName.hs +++ b/System/Mem/StableName.hs @@ -1,3 +1,11 @@ +{-# LANGUAGE CPP #-} +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE MagicHash #-} +#if !defined(__PARALLEL_HASKELL__) +{-# LANGUAGE UnboxedTuples #-} +#endif +#endif + ----------------------------------------------------------------------------- -- | -- Module : System.Mem.StableName diff --git a/System/Mem/Weak.hs b/System/Mem/Weak.hs index 61dce1d..21411e5 100644 --- a/System/Mem/Weak.hs +++ b/System/Mem/Weak.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Mem.Weak @@ -67,16 +69,12 @@ module System.Mem.Weak ( -- $precise ) where -import Data.Maybe (Maybe(..)) - #ifdef __HUGS__ import Hugs.Weak import Prelude #endif #ifdef __GLASGOW_HASKELL__ -import GHC.Base (return) -import GHC.Types (IO) import GHC.Weak #endif diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index 941dd5e..2a6126c 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_HADDOCK hide #-} diff --git a/System/Posix/Types.hs b/System/Posix/Types.hs index bd286f4..676fead 100644 --- a/System/Posix/Types.hs +++ b/System/Posix/Types.hs @@ -1,5 +1,10 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , MagicHash + , GeneralizedNewtypeDeriving + #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Posix.Types diff --git a/System/Timeout.hs b/System/Timeout.hs index 431f709..b1c79b3 100644 --- a/System/Timeout.hs +++ b/System/Timeout.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ------------------------------------------------------------------------------- -- | -- Module : System.Timeout diff --git a/Text/ParserCombinators/ReadP.hs b/Text/ParserCombinators/ReadP.hs index 5dabfd1..27bba54 100644 --- a/Text/ParserCombinators/ReadP.hs +++ b/Text/ParserCombinators/ReadP.hs @@ -1,4 +1,11 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} +#ifndef __NHC__ +{-# LANGUAGE Rank2Types #-} +#endif +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE MagicHash #-} +#endif + ----------------------------------------------------------------------------- -- | -- Module : Text.ParserCombinators.ReadP diff --git a/Text/ParserCombinators/ReadPrec.hs b/Text/ParserCombinators/ReadPrec.hs index 361f11a..f282d1a 100644 --- a/Text/ParserCombinators/ReadPrec.hs +++ b/Text/ParserCombinators/ReadPrec.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.ParserCombinators.ReadPrec diff --git a/Text/Printf.hs b/Text/Printf.hs index 6af2c90..7d4611e 100644 --- a/Text/Printf.hs +++ b/Text/Printf.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Printf diff --git a/Text/Read.hs b/Text/Read.hs index 5ab8877..d935ffe 100644 --- a/Text/Read.hs +++ b/Text/Read.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Read diff --git a/Text/Read/Lex.hs b/Text/Read/Lex.hs index 3329135..222d6cf 100644 --- a/Text/Read/Lex.hs +++ b/Text/Read/Lex.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Read.Lex diff --git a/Text/Show.hs b/Text/Show.hs index d540a1d..4d23e57 100644 --- a/Text/Show.hs +++ b/Text/Show.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Show diff --git a/Text/Show/Functions.hs b/Text/Show/Functions.hs index c66d2e3..1ae46aa 100644 --- a/Text/Show/Functions.hs +++ b/Text/Show/Functions.hs @@ -1,5 +1,7 @@ +{-# LANGUAGE CPP #-} -- This module deliberately declares orphan instances: {-# OPTIONS_GHC -fno-warn-orphans #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Show.Functions diff --git a/Unsafe/Coerce.hs b/Unsafe/Coerce.hs index 516d7e0..421cdd0 100644 --- a/Unsafe/Coerce.hs +++ b/Unsafe/Coerce.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Unsafe.Coerce diff --git a/base.cabal b/base.cabal index ecb0d2d..c4eadf7 100644 --- a/base.cabal +++ b/base.cabal @@ -99,13 +99,6 @@ Library { if os(windows) exposed-modules: GHC.IO.Encoding.CodePage.Table GHC.Conc.Windows - extensions: MagicHash, ExistentialQuantification, Rank2Types, - ScopedTypeVariables, UnboxedTuples, - ForeignFunctionInterface, UnliftedFFITypes, - DeriveDataTypeable, GeneralizedNewtypeDeriving, - FlexibleInstances, StandaloneDeriving, - PatternGuards, EmptyDataDecls, NoImplicitPrelude, - NondecreasingIndentation } exposed-modules: Control.Applicative, @@ -228,7 +221,6 @@ Library { System.Event.Thread System.Event.Unique } - extensions: CPP -- We need to set the package name to base (without a version number) -- as it's magic. ghc-options: -package-name base diff --git a/codepages/MakeTable.hs b/codepages/MakeTable.hs index 951274e..e17380b 100644 --- a/codepages/MakeTable.hs +++ b/codepages/MakeTable.hs @@ -200,7 +200,7 @@ compress n ms = runState (mapM lookupOrAdd chunks) (Map.empty, Map.empty) -- Static parts of the generated module. languageDirectives :: [String] -languageDirectives = ["{-# LANGUAGE MagicHash #-}"] +languageDirectives = ["{-# LANGUAGE CPP, MagicHash #-}"] firstComment :: [FilePath] -> [String]