diff options
author | simonpj@microsoft.com <unknown> | 2011-01-28 12:07:19 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2011-01-28 12:07:19 +0000 |
commit | 32ba2853209b8914fd36947ccf57d34c009a9e47 (patch) | |
tree | 684ac65733ddbdffc48bd4f57e889e9d7f95a610 /libraries | |
parent | 4cc27e70f04c114b4e24e16cdb8c3e9ccf926ca2 (diff) | |
download | haskell-32ba2853209b8914fd36947ccf57d34c009a9e47.tar.gz |
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.
Diffstat (limited to 'libraries')
160 files changed, 484 insertions, 151 deletions
diff --git a/libraries/base/Control/Applicative.hs b/libraries/base/Control/Applicative.hs index a7f7fe8307..c38e5809d9 100644 --- a/libraries/base/Control/Applicative.hs +++ b/libraries/base/Control/Applicative.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Applicative diff --git a/libraries/base/Control/Category.hs b/libraries/base/Control/Category.hs index ff63af5fa2..b63fc67c92 100644 --- a/libraries/base/Control/Category.hs +++ b/libraries/base/Control/Category.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Category diff --git a/libraries/base/Control/Concurrent.hs b/libraries/base/Control/Concurrent.hs index d1b6875e66..514e2e9adf 100644 --- a/libraries/base/Control/Concurrent.hs +++ b/libraries/base/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/libraries/base/Control/Concurrent/Chan.hs b/libraries/base/Control/Concurrent/Chan.hs index e06e0cb7a2..2255c4e49c 100644 --- a/libraries/base/Control/Concurrent/Chan.hs +++ b/libraries/base/Control/Concurrent/Chan.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.Chan diff --git a/libraries/base/Control/Concurrent/MVar.hs b/libraries/base/Control/Concurrent/MVar.hs index b2b688aa03..9a95b8ff08 100644 --- a/libraries/base/Control/Concurrent/MVar.hs +++ b/libraries/base/Control/Concurrent/MVar.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.MVar diff --git a/libraries/base/Control/Concurrent/QSem.hs b/libraries/base/Control/Concurrent/QSem.hs index 8e8a3016db..22f6c0c8f6 100644 --- a/libraries/base/Control/Concurrent/QSem.hs +++ b/libraries/base/Control/Concurrent/QSem.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.QSem diff --git a/libraries/base/Control/Concurrent/QSemN.hs b/libraries/base/Control/Concurrent/QSemN.hs index 7e43908094..cfcff7f5d8 100644 --- a/libraries/base/Control/Concurrent/QSemN.hs +++ b/libraries/base/Control/Concurrent/QSemN.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.QSemN diff --git a/libraries/base/Control/Concurrent/SampleVar.hs b/libraries/base/Control/Concurrent/SampleVar.hs index 7d1a00d7fe..ca68a38f76 100644 --- a/libraries/base/Control/Concurrent/SampleVar.hs +++ b/libraries/base/Control/Concurrent/SampleVar.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.SampleVar diff --git a/libraries/base/Control/Exception.hs b/libraries/base/Control/Exception.hs index 578c2ee8ba..03f6886d1c 100644 --- a/libraries/base/Control/Exception.hs +++ b/libraries/base/Control/Exception.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ExistentialQuantification #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Control/Exception/Base.hs b/libraries/base/Control/Exception/Base.hs index fb4f6de878..cb5321b76b 100644 --- a/libraries/base/Control/Exception/Base.hs +++ b/libraries/base/Control/Exception/Base.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} #include "Typeable.h" diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs index bf94ad4a05..2bbfc5714c 100644 --- a/libraries/base/Control/Monad.hs +++ b/libraries/base/Control/Monad.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Monad diff --git a/libraries/base/Control/Monad/Fix.hs b/libraries/base/Control/Monad/Fix.hs index e8ba03dd9a..a1309faccd 100644 --- a/libraries/base/Control/Monad/Fix.hs +++ b/libraries/base/Control/Monad/Fix.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Fix diff --git a/libraries/base/Control/Monad/ST.hs b/libraries/base/Control/Monad/ST.hs index 8ebb750e3a..397b072533 100644 --- a/libraries/base/Control/Monad/ST.hs +++ b/libraries/base/Control/Monad/ST.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST diff --git a/libraries/base/Control/Monad/ST/Lazy.hs b/libraries/base/Control/Monad/ST/Lazy.hs index 657752ec9f..8aac6651a7 100644 --- a/libraries/base/Control/Monad/ST/Lazy.hs +++ b/libraries/base/Control/Monad/ST/Lazy.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, MagicHash, UnboxedTuples, Rank2Types #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST.Lazy diff --git a/libraries/base/Control/OldException.hs b/libraries/base/Control/OldException.hs index 4fa787f752..02848992b1 100644 --- a/libraries/base/Control/OldException.hs +++ b/libraries/base/Control/OldException.hs @@ -1,4 +1,8 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , ForeignFunctionInterface + , ExistentialQuantification + #-} #include "Typeable.h" diff --git a/libraries/base/Data/Bits.hs b/libraries/base/Data/Bits.hs index c9230c59bf..cbf7b37015 100644 --- a/libraries/base/Data/Bits.hs +++ b/libraries/base/Data/Bits.hs @@ -1,5 +1,5 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Bits diff --git a/libraries/base/Data/Bool.hs b/libraries/base/Data/Bool.hs index 10ca90a334..ba2d8aea27 100644 --- a/libraries/base/Data/Bool.hs +++ b/libraries/base/Data/Bool.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Bool diff --git a/libraries/base/Data/Char.hs b/libraries/base/Data/Char.hs index f9cbbdfa0c..40052a7607 100644 --- a/libraries/base/Data/Char.hs +++ b/libraries/base/Data/Char.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Char diff --git a/libraries/base/Data/Complex.hs b/libraries/base/Data/Complex.hs index 69655479c0..9765edafa0 100644 --- a/libraries/base/Data/Complex.hs +++ b/libraries/base/Data/Complex.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, DeriveDataTypeable #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Complex diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs index 08bc68a63d..d9cab7a5e9 100644 --- a/libraries/base/Data/Data.hs +++ b/libraries/base/Data/Data.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, Rank2Types, ScopedTypeVariables #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Data diff --git a/libraries/base/Data/Dynamic.hs b/libraries/base/Data/Dynamic.hs index 9b007d4f15..b83bbfa89c 100644 --- a/libraries/base/Data/Dynamic.hs +++ b/libraries/base/Data/Dynamic.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Dynamic diff --git a/libraries/base/Data/Either.hs b/libraries/base/Data/Either.hs index fd6651f4cc..1c12897eaa 100644 --- a/libraries/base/Data/Either.hs +++ b/libraries/base/Data/Either.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Either diff --git a/libraries/base/Data/Eq.hs b/libraries/base/Data/Eq.hs index 7e424a22df..e7b99f118f 100644 --- a/libraries/base/Data/Eq.hs +++ b/libraries/base/Data/Eq.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Eq diff --git a/libraries/base/Data/Fixed.hs b/libraries/base/Data/Fixed.hs index 98d212defd..cd4409295b 100644 --- a/libraries/base/Data/Fixed.hs +++ b/libraries/base/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/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs index d07bebe074..354bd8b270 100644 --- a/libraries/base/Data/Foldable.hs +++ b/libraries/base/Data/Foldable.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Foldable diff --git a/libraries/base/Data/Functor.hs b/libraries/base/Data/Functor.hs index e5b8166319..84d0aa7256 100644 --- a/libraries/base/Data/Functor.hs +++ b/libraries/base/Data/Functor.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Functor diff --git a/libraries/base/Data/HashTable.hs b/libraries/base/Data/HashTable.hs index c407abf436..e96160a59c 100644 --- a/libraries/base/Data/HashTable.hs +++ b/libraries/base/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/libraries/base/Data/IORef.hs b/libraries/base/Data/IORef.hs index f8857510e4..a6f29e7fc6 100644 --- a/libraries/base/Data/IORef.hs +++ b/libraries/base/Data/IORef.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.IORef diff --git a/libraries/base/Data/Int.hs b/libraries/base/Data/Int.hs index 67b4ba8d12..c9c9036d53 100644 --- a/libraries/base/Data/Int.hs +++ b/libraries/base/Data/Int.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Int diff --git a/libraries/base/Data/Ix.hs b/libraries/base/Data/Ix.hs index fda6d58c4a..a01e516265 100644 --- a/libraries/base/Data/Ix.hs +++ b/libraries/base/Data/Ix.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Ix diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs index 0e4e621363..061ad42a01 100644 --- a/libraries/base/Data/List.hs +++ b/libraries/base/Data/List.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.List diff --git a/libraries/base/Data/Maybe.hs b/libraries/base/Data/Maybe.hs index 981d028d42..b96efa7829 100644 --- a/libraries/base/Data/Maybe.hs +++ b/libraries/base/Data/Maybe.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Maybe diff --git a/libraries/base/Data/Monoid.hs b/libraries/base/Data/Monoid.hs index b3233ba13e..aaefd42169 100644 --- a/libraries/base/Data/Monoid.hs +++ b/libraries/base/Data/Monoid.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Monoid diff --git a/libraries/base/Data/Ord.hs b/libraries/base/Data/Ord.hs index 9af4246e85..fd291ae960 100644 --- a/libraries/base/Data/Ord.hs +++ b/libraries/base/Data/Ord.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Ord diff --git a/libraries/base/Data/Ratio.hs b/libraries/base/Data/Ratio.hs index d64297f0ec..f0440993a3 100644 --- a/libraries/base/Data/Ratio.hs +++ b/libraries/base/Data/Ratio.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Ratio diff --git a/libraries/base/Data/STRef.hs b/libraries/base/Data/STRef.hs index 288cbe778f..5002ee7fde 100644 --- a/libraries/base/Data/STRef.hs +++ b/libraries/base/Data/STRef.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.STRef diff --git a/libraries/base/Data/String.hs b/libraries/base/Data/String.hs index c2dc17ed0f..dae81a2d5e 100644 --- a/libraries/base/Data/String.hs +++ b/libraries/base/Data/String.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, FlexibleInstances #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.String diff --git a/libraries/base/Data/Traversable.hs b/libraries/base/Data/Traversable.hs index af04e51f3a..2bdc1bc26d 100644 --- a/libraries/base/Data/Traversable.hs +++ b/libraries/base/Data/Traversable.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Traversable diff --git a/libraries/base/Data/Tuple.hs b/libraries/base/Data/Tuple.hs index 6921a21165..a5ea87570f 100644 --- a/libraries/base/Data/Tuple.hs +++ b/libraries/base/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/libraries/base/Data/Typeable.hs b/libraries/base/Data/Typeable.hs index e606294a08..804e853b8d 100644 --- a/libraries/base/Data/Typeable.hs +++ b/libraries/base/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/libraries/base/Data/Typeable.hs-boot b/libraries/base/Data/Typeable.hs-boot index 9da3620c9c..da6142e83f 100644 --- a/libraries/base/Data/Typeable.hs-boot +++ b/libraries/base/Data/Typeable.hs-boot @@ -1,5 +1,4 @@ - -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module Data.Typeable where diff --git a/libraries/base/Data/Unique.hs b/libraries/base/Data/Unique.hs index ab3d64718d..c4c8827433 100644 --- a/libraries/base/Data/Unique.hs +++ b/libraries/base/Data/Unique.hs @@ -1,3 +1,9 @@ +{-# LANGUAGE CPP #-} + +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE MagicHash, DeriveDataTypeable #-} +#endif + ----------------------------------------------------------------------------- -- | -- Module : Data.Unique diff --git a/libraries/base/Data/Version.hs b/libraries/base/Data/Version.hs index ef9c07ddec..7d7d329635 100644 --- a/libraries/base/Data/Version.hs +++ b/libraries/base/Data/Version.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, DeriveDataTypeable #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Version diff --git a/libraries/base/Data/Word.hs b/libraries/base/Data/Word.hs index c4bf0a6870..18300d2512 100644 --- a/libraries/base/Data/Word.hs +++ b/libraries/base/Data/Word.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Word diff --git a/libraries/base/Debug/Trace.hs b/libraries/base/Debug/Trace.hs index 742044e4d4..ebacb6c3d7 100644 --- a/libraries/base/Debug/Trace.hs +++ b/libraries/base/Debug/Trace.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : Debug.Trace diff --git a/libraries/base/Foreign.hs b/libraries/base/Foreign.hs index 5976c20985..a26ffaf2bd 100644 --- a/libraries/base/Foreign.hs +++ b/libraries/base/Foreign.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign diff --git a/libraries/base/Foreign/C.hs b/libraries/base/Foreign/C.hs index cb8dfef3b5..2c7fd2e24f 100644 --- a/libraries/base/Foreign/C.hs +++ b/libraries/base/Foreign/C.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.C diff --git a/libraries/base/Foreign/C/Error.hs b/libraries/base/Foreign/C/Error.hs index 8d149c1dc6..89c736d065 100644 --- a/libraries/base/Foreign/C/Error.hs +++ b/libraries/base/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/libraries/base/Foreign/C/String.hs b/libraries/base/Foreign/C/String.hs index 680c81a167..becfa4ea68 100644 --- a/libraries/base/Foreign/C/String.hs +++ b/libraries/base/Foreign/C/String.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.String diff --git a/libraries/base/Foreign/C/Types.hs b/libraries/base/Foreign/C/Types.hs index e30a2baf21..22bae5c187 100644 --- a/libraries/base/Foreign/C/Types.hs +++ b/libraries/base/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/libraries/base/Foreign/Concurrent.hs b/libraries/base/Foreign/Concurrent.hs index a914d9532f..e0f2faaa95 100644 --- a/libraries/base/Foreign/Concurrent.hs +++ b/libraries/base/Foreign/Concurrent.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Concurrent diff --git a/libraries/base/Foreign/ForeignPtr.hs b/libraries/base/Foreign/ForeignPtr.hs index a824914ee0..b91ffebf52 100644 --- a/libraries/base/Foreign/ForeignPtr.hs +++ b/libraries/base/Foreign/ForeignPtr.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.ForeignPtr diff --git a/libraries/base/Foreign/Marshal.hs b/libraries/base/Foreign/Marshal.hs index 2c16c018fe..77a4ebf3cc 100644 --- a/libraries/base/Foreign/Marshal.hs +++ b/libraries/base/Foreign/Marshal.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal diff --git a/libraries/base/Foreign/Marshal/Alloc.hs b/libraries/base/Foreign/Marshal/Alloc.hs index 5c86155d58..ddb4a90bae 100644 --- a/libraries/base/Foreign/Marshal/Alloc.hs +++ b/libraries/base/Foreign/Marshal/Alloc.hs @@ -1,4 +1,10 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , MagicHash + , UnboxedTuples + , ForeignFunctionInterface + #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Alloc diff --git a/libraries/base/Foreign/Marshal/Array.hs b/libraries/base/Foreign/Marshal/Array.hs index 9e8d08287d..1ca3e9e236 100644 --- a/libraries/base/Foreign/Marshal/Array.hs +++ b/libraries/base/Foreign/Marshal/Array.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Array diff --git a/libraries/base/Foreign/Marshal/Error.hs b/libraries/base/Foreign/Marshal/Error.hs index b018f2ab0c..ccf514d70d 100644 --- a/libraries/base/Foreign/Marshal/Error.hs +++ b/libraries/base/Foreign/Marshal/Error.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Error diff --git a/libraries/base/Foreign/Marshal/Pool.hs b/libraries/base/Foreign/Marshal/Pool.hs index f15d048a95..ed94e464fb 100644 --- a/libraries/base/Foreign/Marshal/Pool.hs +++ b/libraries/base/Foreign/Marshal/Pool.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + -------------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Pool diff --git a/libraries/base/Foreign/Marshal/Utils.hs b/libraries/base/Foreign/Marshal/Utils.hs index 7fcacfa8c7..5ae677a19d 100644 --- a/libraries/base/Foreign/Marshal/Utils.hs +++ b/libraries/base/Foreign/Marshal/Utils.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Utils diff --git a/libraries/base/Foreign/Ptr.hs b/libraries/base/Foreign/Ptr.hs index 8dd220f769..b46acc1bea 100644 --- a/libraries/base/Foreign/Ptr.hs +++ b/libraries/base/Foreign/Ptr.hs @@ -1,4 +1,10 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , ForeignFunctionInterface + , MagicHash + , GeneralizedNewtypeDeriving + #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Ptr diff --git a/libraries/base/Foreign/StablePtr.hs b/libraries/base/Foreign/StablePtr.hs index cfcd239134..522c6fc344 100644 --- a/libraries/base/Foreign/StablePtr.hs +++ b/libraries/base/Foreign/StablePtr.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.StablePtr diff --git a/libraries/base/Foreign/Storable.hs b/libraries/base/Foreign/Storable.hs index 0b0ad0cda1..700a4ff5ee 100644 --- a/libraries/base/Foreign/Storable.hs +++ b/libraries/base/Foreign/Storable.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.Storable diff --git a/libraries/base/GHC/Arr.lhs b/libraries/base/GHC/Arr.lhs index b9ce6b700e..fd858b1dd4 100644 --- a/libraries/base/GHC/Arr.lhs +++ b/libraries/base/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/libraries/base/GHC/Base.lhs b/libraries/base/GHC/Base.lhs index 5ab0b26277..be1b57bbd5 100644 --- a/libraries/base/GHC/Base.lhs +++ b/libraries/base/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/libraries/base/GHC/Classes.hs b/libraries/base/GHC/Classes.hs index 2934d1d98a..17d0f93e1b 100644 --- a/libraries/base/GHC/Classes.hs +++ b/libraries/base/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/libraries/base/GHC/Conc.lhs b/libraries/base/GHC/Conc.lhs index b12785f4d3..665f82f9bb 100644 --- a/libraries/base/GHC/Conc.lhs +++ b/libraries/base/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/libraries/base/GHC/Conc/IO.hs b/libraries/base/GHC/Conc/IO.hs index ca75894dbc..fc800261b0 100644 --- a/libraries/base/GHC/Conc/IO.hs +++ b/libraries/base/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/libraries/base/GHC/Conc/Signal.hs b/libraries/base/GHC/Conc/Signal.hs index 6d300c6380..851c4bb72c 100644 --- a/libraries/base/GHC/Conc/Signal.hs +++ b/libraries/base/GHC/Conc/Signal.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, ForeignFunctionInterface #-} module GHC.Conc.Signal ( Signal diff --git a/libraries/base/GHC/Conc/Sync.lhs b/libraries/base/GHC/Conc/Sync.lhs index 0808e68f21..b4de53a636 100644 --- a/libraries/base/GHC/Conc/Sync.lhs +++ b/libraries/base/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/libraries/base/GHC/Conc/Windows.hs b/libraries/base/GHC/Conc/Windows.hs index b750185586..96f034cfb8 100644 --- a/libraries/base/GHC/Conc/Windows.hs +++ b/libraries/base/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/libraries/base/GHC/ConsoleHandler.hs b/libraries/base/GHC/ConsoleHandler.hs index eb5f36a813..223a2bb8c5 100644 --- a/libraries/base/GHC/ConsoleHandler.hs +++ b/libraries/base/GHC/ConsoleHandler.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -cpp #-} +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.ConsoleHandler diff --git a/libraries/base/GHC/Constants.hs b/libraries/base/GHC/Constants.hs index 3df2d960fb..871829d832 100644 --- a/libraries/base/GHC/Constants.hs +++ b/libraries/base/GHC/Constants.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} module GHC.Constants where diff --git a/libraries/base/GHC/Desugar.hs b/libraries/base/GHC/Desugar.hs index eaa15dcf3e..65dd645dab 100644 --- a/libraries/base/GHC/Desugar.hs +++ b/libraries/base/GHC/Desugar.hs @@ -1,3 +1,9 @@ +{-# LANGUAGE CPP + , NoImplicitPrelude + , Rank2Types + , ExistentialQuantification + #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Desugar diff --git a/libraries/base/GHC/Enum.lhs b/libraries/base/GHC/Enum.lhs index 7cb6f07803..ac6e9a916a 100644 --- a/libraries/base/GHC/Enum.lhs +++ b/libraries/base/GHC/Enum.lhs @@ -1,6 +1,5 @@ \begin{code} -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, BangPatterns, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/Environment.hs b/libraries/base/GHC/Environment.hs index 4b9b0a1b29..60325b3611 100644 --- a/libraries/base/GHC/Environment.hs +++ b/libraries/base/GHC/Environment.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE ForeignFunctionInterface #-} module GHC.Environment (getFullArgs) where diff --git a/libraries/base/GHC/Err.lhs b/libraries/base/GHC/Err.lhs index 9a94ce0c17..90142f400f 100644 --- a/libraries/base/GHC/Err.lhs +++ b/libraries/base/GHC/Err.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Err diff --git a/libraries/base/GHC/Err.lhs-boot b/libraries/base/GHC/Err.lhs-boot index 9bef80d925..932f699de9 100644 --- a/libraries/base/GHC/Err.lhs-boot +++ b/libraries/base/GHC/Err.lhs-boot @@ -1,5 +1,6 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} + --------------------------------------------------------------------------- -- Ghc.Err.hs-boot --------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Exception.lhs b/libraries/base/GHC/Exception.lhs index 4dce281d50..c5b967970d 100644 --- a/libraries/base/GHC/Exception.lhs +++ b/libraries/base/GHC/Exception.lhs @@ -1,5 +1,9 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude + , ExistentialQuantification + , MagicHash + , DeriveDataTypeable + #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs index ea4b8ff2a8..81a9dbb4ed 100644 --- a/libraries/base/GHC/Exts.hs +++ b/libraries/base/GHC/Exts.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, DeriveDataTypeable #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Exts diff --git a/libraries/base/GHC/Float.lhs b/libraries/base/GHC/Float.lhs index a353cc688c..02aba8ca85 100644 --- a/libraries/base/GHC/Float.lhs +++ b/libraries/base/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/libraries/base/GHC/ForeignPtr.hs b/libraries/base/GHC/ForeignPtr.hs index a20b000156..2e737f0fa3 100644 --- a/libraries/base/GHC/ForeignPtr.hs +++ b/libraries/base/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/libraries/base/GHC/IO.hs b/libraries/base/GHC/IO.hs index d5272ba866..9fa7299dd5 100644 --- a/libraries/base/GHC/IO.hs +++ b/libraries/base/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/libraries/base/GHC/IO.hs-boot b/libraries/base/GHC/IO.hs-boot index 703fad53d6..8bd5265f12 100644 --- a/libraries/base/GHC/IO.hs-boot +++ b/libraries/base/GHC/IO.hs-boot @@ -1,3 +1,5 @@ +{-# LANGUAGE NoImplicitPrelude #-} + module GHC.IO where import GHC.Types diff --git a/libraries/base/GHC/IO/Buffer.hs b/libraries/base/GHC/IO/Buffer.hs index b72eaf2096..c019d69bea 100644 --- a/libraries/base/GHC/IO/Buffer.hs +++ b/libraries/base/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/libraries/base/GHC/IO/BufferedIO.hs b/libraries/base/GHC/IO/BufferedIO.hs index 584f5a7852..874a02d1dc 100644 --- a/libraries/base/GHC/IO/BufferedIO.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Device.hs b/libraries/base/GHC/IO/Device.hs index 8f907d590b..bc772b8178 100644 --- a/libraries/base/GHC/IO/Device.hs +++ b/libraries/base/GHC/IO/Device.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Device diff --git a/libraries/base/GHC/IO/Encoding.hs b/libraries/base/GHC/IO/Encoding.hs index 44cdd86d7e..9f56966e0b 100644 --- a/libraries/base/GHC/IO/Encoding.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Encoding/CodePage.hs b/libraries/base/GHC/IO/Encoding/CodePage.hs index 17c1615666..34bc0db074 100644 --- a/libraries/base/GHC/IO/Encoding/CodePage.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Encoding/Iconv.hs b/libraries/base/GHC/IO/Encoding/Iconv.hs index faf58e9860..0316698f3c 100644 --- a/libraries/base/GHC/IO/Encoding/Iconv.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Encoding/Latin1.hs b/libraries/base/GHC/IO/Encoding/Latin1.hs index 5bdf60845c..6bf18c876c 100644 --- a/libraries/base/GHC/IO/Encoding/Latin1.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Encoding/Types.hs b/libraries/base/GHC/IO/Encoding/Types.hs index 640ea8847d..caffa24815 100644 --- a/libraries/base/GHC/IO/Encoding/Types.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Encoding/UTF16.hs b/libraries/base/GHC/IO/Encoding/UTF16.hs index bb38a79cd9..c3b384752e 100644 --- a/libraries/base/GHC/IO/Encoding/UTF16.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Encoding/UTF32.hs b/libraries/base/GHC/IO/Encoding/UTF32.hs index 685bdaff83..1eef105960 100644 --- a/libraries/base/GHC/IO/Encoding/UTF32.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Encoding/UTF8.hs b/libraries/base/GHC/IO/Encoding/UTF8.hs index 1cf8092c67..dea4fdea9e 100644 --- a/libraries/base/GHC/IO/Encoding/UTF8.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Exception.hs b/libraries/base/GHC/IO/Exception.hs index 219047a293..4134fca867 100644 --- a/libraries/base/GHC/IO/Exception.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Exception.hs-boot b/libraries/base/GHC/IO/Exception.hs-boot index f1ba7249f6..d094ef2c54 100644 --- a/libraries/base/GHC/IO/Exception.hs-boot +++ b/libraries/base/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/libraries/base/GHC/IO/FD.hs b/libraries/base/GHC/IO/FD.hs index f2ce2750e0..b5392d477d 100644 --- a/libraries/base/GHC/IO/FD.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Handle.hs b/libraries/base/GHC/IO/Handle.hs index a2273ee5fe..f42fd55c04 100644 --- a/libraries/base/GHC/IO/Handle.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Handle.hs-boot b/libraries/base/GHC/IO/Handle.hs-boot index 68379e2249..d925f08439 100644 --- a/libraries/base/GHC/IO/Handle.hs-boot +++ b/libraries/base/GHC/IO/Handle.hs-boot @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module GHC.IO.Handle where diff --git a/libraries/base/GHC/IO/Handle/FD.hs b/libraries/base/GHC/IO/Handle/FD.hs index 0ef0cea62e..fd188a852d 100644 --- a/libraries/base/GHC/IO/Handle/FD.hs +++ b/libraries/base/GHC/IO/Handle/FD.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, PatternGuards #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Handle.FD diff --git a/libraries/base/GHC/IO/Handle/FD.hs-boot b/libraries/base/GHC/IO/Handle/FD.hs-boot index 657af3882e..2d84884a45 100644 --- a/libraries/base/GHC/IO/Handle/FD.hs-boot +++ b/libraries/base/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/libraries/base/GHC/IO/Handle/Internals.hs b/libraries/base/GHC/IO/Handle/Internals.hs index 76e8b008ca..6409bbdb33 100644 --- a/libraries/base/GHC/IO/Handle/Internals.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Handle/Text.hs b/libraries/base/GHC/IO/Handle/Text.hs index e481efd593..160e9d7391 100644 --- a/libraries/base/GHC/IO/Handle/Text.hs +++ b/libraries/base/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/libraries/base/GHC/IO/Handle/Types.hs b/libraries/base/GHC/IO/Handle/Types.hs index 766c02703c..bff4681398 100644 --- a/libraries/base/GHC/IO/Handle/Types.hs +++ b/libraries/base/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/libraries/base/GHC/IO/IOMode.hs b/libraries/base/GHC/IO/IOMode.hs index 606f24ff0a..3b0943cec9 100644 --- a/libraries/base/GHC/IO/IOMode.hs +++ b/libraries/base/GHC/IO/IOMode.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/IOArray.hs b/libraries/base/GHC/IOArray.hs index 35638ff72c..67ee0149f2 100644 --- a/libraries/base/GHC/IOArray.hs +++ b/libraries/base/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/libraries/base/GHC/IOBase.hs b/libraries/base/GHC/IOBase.hs index c80756a3ae..4177b07ae3 100644 --- a/libraries/base/GHC/IOBase.hs +++ b/libraries/base/GHC/IOBase.hs @@ -1,4 +1,6 @@ +{-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IOBase diff --git a/libraries/base/GHC/IORef.hs b/libraries/base/GHC/IORef.hs index 51466bc655..be2808d338 100644 --- a/libraries/base/GHC/IORef.hs +++ b/libraries/base/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/libraries/base/GHC/Int.hs b/libraries/base/GHC/Int.hs index 03d488e6e0..05d10c580b 100644 --- a/libraries/base/GHC/Int.hs +++ b/libraries/base/GHC/Int.hs @@ -1,5 +1,4 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/List.lhs b/libraries/base/GHC/List.lhs index fe6750280c..ff8593ca42 100644 --- a/libraries/base/GHC/List.lhs +++ b/libraries/base/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/libraries/base/GHC/MVar.hs b/libraries/base/GHC/MVar.hs index 348ae51a67..8c653dca6a 100644 --- a/libraries/base/GHC/MVar.hs +++ b/libraries/base/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/libraries/base/GHC/Num.lhs b/libraries/base/GHC/Num.lhs index 5a94949350..5dc5e753d1 100644 --- a/libraries/base/GHC/Num.lhs +++ b/libraries/base/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/libraries/base/GHC/PArr.hs b/libraries/base/GHC/PArr.hs index c9b5f9be5d..6a5328fb3c 100644 --- a/libraries/base/GHC/PArr.hs +++ b/libraries/base/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/libraries/base/GHC/Pack.lhs b/libraries/base/GHC/Pack.lhs index f3e9609a44..14ac670773 100644 --- a/libraries/base/GHC/Pack.lhs +++ b/libraries/base/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/libraries/base/GHC/Ptr.lhs b/libraries/base/GHC/Ptr.lhs index 2ba743db32..bf78f713bd 100644 --- a/libraries/base/GHC/Ptr.lhs +++ b/libraries/base/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/libraries/base/GHC/Read.lhs b/libraries/base/GHC/Read.lhs index 1a7b6a82cc..77daececb7 100644 --- a/libraries/base/GHC/Read.lhs +++ b/libraries/base/GHC/Read.lhs @@ -1,6 +1,7 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Read diff --git a/libraries/base/GHC/Real.lhs b/libraries/base/GHC/Real.lhs index 68e3784ec1..be2a296439 100644 --- a/libraries/base/GHC/Real.lhs +++ b/libraries/base/GHC/Real.lhs @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/ST.lhs b/libraries/base/GHC/ST.lhs index e3e24bf845..dc62000a21 100644 --- a/libraries/base/GHC/ST.lhs +++ b/libraries/base/GHC/ST.lhs @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples, Rank2Types #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/STRef.lhs b/libraries/base/GHC/STRef.lhs index a0dba8d080..9306b2473c 100644 --- a/libraries/base/GHC/STRef.lhs +++ b/libraries/base/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/libraries/base/GHC/Show.lhs b/libraries/base/GHC/Show.lhs index 2c673a82c8..6cb8bf35f7 100644 --- a/libraries/base/GHC/Show.lhs +++ b/libraries/base/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/libraries/base/GHC/Show.lhs-boot b/libraries/base/GHC/Show.lhs-boot index b01d16545b..6c5fa61308 100644 --- a/libraries/base/GHC/Show.lhs-boot +++ b/libraries/base/GHC/Show.lhs-boot @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module GHC.Show (showSignedInt) where diff --git a/libraries/base/GHC/Stable.lhs b/libraries/base/GHC/Stable.lhs index 6bac7d1cb7..e96bf687ae 100644 --- a/libraries/base/GHC/Stable.lhs +++ b/libraries/base/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/libraries/base/GHC/Storable.lhs b/libraries/base/GHC/Storable.lhs index 982230c921..a722873865 100644 --- a/libraries/base/GHC/Storable.lhs +++ b/libraries/base/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/libraries/base/GHC/TopHandler.lhs b/libraries/base/GHC/TopHandler.lhs index 0f55b38ba3..7bedcfea5d 100644 --- a/libraries/base/GHC/TopHandler.lhs +++ b/libraries/base/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/libraries/base/GHC/Unicode.hs b/libraries/base/GHC/Unicode.hs index baca83342b..b34f677069 100644 --- a/libraries/base/GHC/Unicode.hs +++ b/libraries/base/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/libraries/base/GHC/Unicode.hs-boot b/libraries/base/GHC/Unicode.hs-boot index 6a0e75cbb6..cc67dbbb11 100644 --- a/libraries/base/GHC/Unicode.hs-boot +++ b/libraries/base/GHC/Unicode.hs-boot @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude #-} module GHC.Unicode where diff --git a/libraries/base/GHC/Weak.lhs b/libraries/base/GHC/Weak.lhs index af44c88514..67046f88f3 100644 --- a/libraries/base/GHC/Weak.lhs +++ b/libraries/base/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/libraries/base/GHC/Word.hs b/libraries/base/GHC/Word.hs index 9a6355c8c7..9d3e1a6ae7 100644 --- a/libraries/base/GHC/Word.hs +++ b/libraries/base/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/libraries/base/NHC/PosixTypes.hsc b/libraries/base/NHC/PosixTypes.hsc index 64c3e28aca..efae04eeda 100644 --- a/libraries/base/NHC/PosixTypes.hsc +++ b/libraries/base/NHC/PosixTypes.hsc @@ -1,4 +1,6 @@ +{-# LANGUAGE CPP #-} {-# OPTIONS_NHC98 -I/usr/include #-} + ----------------------------------------------------------------------------- -- | -- Module : NHC.PosixTypes diff --git a/libraries/base/Numeric.hs b/libraries/base/Numeric.hs index d6dcdfe152..4b202d0efd 100644 --- a/libraries/base/Numeric.hs +++ b/libraries/base/Numeric.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Numeric diff --git a/libraries/base/Prelude.hs b/libraries/base/Prelude.hs index 8ede773a36..4c183ae38c 100644 --- a/libraries/base/Prelude.hs +++ b/libraries/base/Prelude.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns #-} +{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns #-} + ----------------------------------------------------------------------------- -- | -- Module : Prelude diff --git a/libraries/base/System/CPUTime.hsc b/libraries/base/System/CPUTime.hsc index f050a681ae..a25c750ff3 100644 --- a/libraries/base/System/CPUTime.hsc +++ b/libraries/base/System/CPUTime.hsc @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, NondecreasingIndentation, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : System.CPUTime diff --git a/libraries/base/System/Environment.hs b/libraries/base/System/Environment.hs index b85bc42e5e..2b6dec272d 100644 --- a/libraries/base/System/Environment.hs +++ b/libraries/base/System/Environment.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Environment diff --git a/libraries/base/System/Event/Clock.hsc b/libraries/base/System/Event/Clock.hsc index 73d2a52798..ae31a7bb54 100644 --- a/libraries/base/System/Event/Clock.hsc +++ b/libraries/base/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/libraries/base/System/Event/Control.hs b/libraries/base/System/Event/Control.hs index 167eb774c7..635d864111 100644 --- a/libraries/base/System/Event/Control.hs +++ b/libraries/base/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/libraries/base/System/Event/EPoll.hsc b/libraries/base/System/Event/EPoll.hsc index ccc8ec032c..b2311c8940 100644 --- a/libraries/base/System/Event/EPoll.hsc +++ b/libraries/base/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/libraries/base/System/Event/IntMap.hs b/libraries/base/System/Event/IntMap.hs index f02628bad4..61ae002567 100644 --- a/libraries/base/System/Event/IntMap.hs +++ b/libraries/base/System/Event/IntMap.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP, MagicHash, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Event.IntMap diff --git a/libraries/base/System/Event/KQueue.hsc b/libraries/base/System/Event/KQueue.hsc index 4cf6a5ddcb..4a86435209 100644 --- a/libraries/base/System/Event/KQueue.hsc +++ b/libraries/base/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/libraries/base/System/Event/Manager.hs b/libraries/base/System/Event/Manager.hs index 0c8293f5f3..9766774f55 100644 --- a/libraries/base/System/Event/Manager.hs +++ b/libraries/base/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/libraries/base/System/Event/Poll.hsc b/libraries/base/System/Event/Poll.hsc index d6929f801c..323ab9c657 100644 --- a/libraries/base/System/Event/Poll.hsc +++ b/libraries/base/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/libraries/base/System/Exit.hs b/libraries/base/System/Exit.hs index 7cca0174a0..7eb17cfbfe 100644 --- a/libraries/base/System/Exit.hs +++ b/libraries/base/System/Exit.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Exit diff --git a/libraries/base/System/IO.hs b/libraries/base/System/IO.hs index d52c2c9d06..f60ecadeee 100644 --- a/libraries/base/System/IO.hs +++ b/libraries/base/System/IO.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : System.IO diff --git a/libraries/base/System/IO/Error.hs b/libraries/base/System/IO/Error.hs index d1c4e4714f..a5aba922d0 100644 --- a/libraries/base/System/IO/Error.hs +++ b/libraries/base/System/IO/Error.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/System/IO/Unsafe.hs b/libraries/base/System/IO/Unsafe.hs index 05f2c7bd8e..3ef3d9f3e0 100644 --- a/libraries/base/System/IO/Unsafe.hs +++ b/libraries/base/System/IO/Unsafe.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : System.IO.Unsafe diff --git a/libraries/base/System/Info.hs b/libraries/base/System/Info.hs index b38aea265f..92da1a64b7 100644 --- a/libraries/base/System/Info.hs +++ b/libraries/base/System/Info.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Info diff --git a/libraries/base/System/Mem.hs b/libraries/base/System/Mem.hs index 39a98da021..af96b5dd1c 100644 --- a/libraries/base/System/Mem.hs +++ b/libraries/base/System/Mem.hs @@ -1,3 +1,9 @@ +{-# LANGUAGE CPP #-} + +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE ForeignFunctionInterface #-} +#endif + ----------------------------------------------------------------------------- -- | -- Module : System.Mem diff --git a/libraries/base/System/Mem/StableName.hs b/libraries/base/System/Mem/StableName.hs index beeb51490c..d7d27a3c51 100644 --- a/libraries/base/System/Mem/StableName.hs +++ b/libraries/base/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/libraries/base/System/Mem/Weak.hs b/libraries/base/System/Mem/Weak.hs index 61dce1d1fe..21411e531c 100644 --- a/libraries/base/System/Mem/Weak.hs +++ b/libraries/base/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/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index 941dd5e6f1..2a6126cdc0 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/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/libraries/base/System/Posix/Types.hs b/libraries/base/System/Posix/Types.hs index bd286f4462..676feadc05 100644 --- a/libraries/base/System/Posix/Types.hs +++ b/libraries/base/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/libraries/base/System/Timeout.hs b/libraries/base/System/Timeout.hs index 431f709a25..b1c79b3c16 100644 --- a/libraries/base/System/Timeout.hs +++ b/libraries/base/System/Timeout.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ------------------------------------------------------------------------------- -- | -- Module : System.Timeout diff --git a/libraries/base/Text/ParserCombinators/ReadP.hs b/libraries/base/Text/ParserCombinators/ReadP.hs index 5dabfd1cd7..27bba5404e 100644 --- a/libraries/base/Text/ParserCombinators/ReadP.hs +++ b/libraries/base/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/libraries/base/Text/ParserCombinators/ReadPrec.hs b/libraries/base/Text/ParserCombinators/ReadPrec.hs index 361f11af86..f282d1af45 100644 --- a/libraries/base/Text/ParserCombinators/ReadPrec.hs +++ b/libraries/base/Text/ParserCombinators/ReadPrec.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.ParserCombinators.ReadPrec diff --git a/libraries/base/Text/Printf.hs b/libraries/base/Text/Printf.hs index 6af2c90d55..7d4611eade 100644 --- a/libraries/base/Text/Printf.hs +++ b/libraries/base/Text/Printf.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Printf diff --git a/libraries/base/Text/Read.hs b/libraries/base/Text/Read.hs index 5ab8877efc..d935ffec41 100644 --- a/libraries/base/Text/Read.hs +++ b/libraries/base/Text/Read.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Read diff --git a/libraries/base/Text/Read/Lex.hs b/libraries/base/Text/Read/Lex.hs index 33291354b8..222d6cf06d 100644 --- a/libraries/base/Text/Read/Lex.hs +++ b/libraries/base/Text/Read/Lex.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Read.Lex diff --git a/libraries/base/Text/Show.hs b/libraries/base/Text/Show.hs index d540a1d077..4d23e578df 100644 --- a/libraries/base/Text/Show.hs +++ b/libraries/base/Text/Show.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.Show diff --git a/libraries/base/Text/Show/Functions.hs b/libraries/base/Text/Show/Functions.hs index c66d2e3156..1ae46aa29d 100644 --- a/libraries/base/Text/Show/Functions.hs +++ b/libraries/base/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/libraries/base/Unsafe/Coerce.hs b/libraries/base/Unsafe/Coerce.hs index 516d7e06b6..421cdd0bdf 100644 --- a/libraries/base/Unsafe/Coerce.hs +++ b/libraries/base/Unsafe/Coerce.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} + ----------------------------------------------------------------------------- -- | -- Module : Unsafe.Coerce diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal index ecb0d2deee..c4eadf703a 100644 --- a/libraries/base/base.cabal +++ b/libraries/base/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/libraries/base/codepages/MakeTable.hs b/libraries/base/codepages/MakeTable.hs index 951274e8a4..e17380b538 100644 --- a/libraries/base/codepages/MakeTable.hs +++ b/libraries/base/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] |