Commit 32ba2853 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

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.
parent 4cc27e70
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Applicative
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Category
......
{-# LANGUAGE CPP
, ForeignFunctionInterface
, MagicHash
, UnboxedTuples
, ScopedTypeVariables
#-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.Chan
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.MVar
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.QSem
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.QSemN
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.SampleVar
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, ExistentialQuantification #-}
-----------------------------------------------------------------------------
-- |
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-}
#include "Typeable.h"
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Fix
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.ST
......
{-# LANGUAGE CPP, MagicHash, UnboxedTuples, Rank2Types #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.ST.Lazy
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP
, NoImplicitPrelude
, ForeignFunctionInterface
, ExistentialQuantification
#-}
#include "Typeable.h"
......
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bits
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bool
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Char
......
{-# LANGUAGE CPP, DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Complex
......
{-# LANGUAGE CPP, Rank2Types, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Data
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Dynamic
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Either
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Eq
......
{-# LANGUAGE CPP #-}
{-# OPTIONS -Wall -fno-warn-unused-binds #-}
#ifndef __NHC__
{-# LANGUAGE DeriveDataTypeable #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.Fixed
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Foldable
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Functor
......
{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields -fno-warn-name-shadowing #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
{-# OPTIONS_GHC -funbox-strict-fields -fno-warn-name-shadowing #-}
-----------------------------------------------------------------------------
-- |
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.IORef
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Int
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ix
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.List
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Maybe
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Monoid
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ord
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ratio
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.STRef
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, FlexibleInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.String
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Traversable
......
{-# 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.
-----------------------------------------------------------------------------
......
{-# 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
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Data.Typeable where
......
{-# LANGUAGE CPP #-}
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE MagicHash, DeriveDataTypeable #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.Unique
......
{-# LANGUAGE CPP, DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Version
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Word
......
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
-----------------------------------------------------------------------------
-- |
-- Module : Debug.Trace
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.C
......
{-# OPTIONS_GHC -XNoImplicitPrelude -#include "HsBase.h" #-}
{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-}
{-# OPTIONS_GHC -#include "HsBase.h" #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.C.Error
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.C.String
......
{-# 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
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Concurrent
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.ForeignPtr
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP
, NoImplicitPrelude
, MagicHash
, UnboxedTuples
, ForeignFunctionInterface
#-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Alloc
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Array
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Error
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
--------------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Pool
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Utils
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP
, NoImplicitPrelude
, ForeignFunctionInterface
, MagicHash
, GeneralizedNewtypeDeriving
#-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Ptr
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.StablePtr
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Storable
......
\begin{code}
{-# LANGUAGE NoImplicitPrelude, NoBangPatterns, MagicHash, UnboxedTuples #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# LANGUAGE NoImplicitPrelude, NoBangPatterns #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Arr
......
......@@ -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
......
{-# 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 #-}
......
\begin{code}
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Conc
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE CPP
, NoImplicitPrelude
, MagicHash
, UnboxedTuples
, ForeignFunctionInterface
#-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Conc.IO
......
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE NoImplicitPrelude, ForeignFunctionInterface #-}
module GHC.Conc.Signal
( Signal
......
\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
......
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Conc.Windows
......
{-# OPTIONS_GHC -cpp #-}
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.ConsoleHandler
......
{-# LANGUAGE CPP #-}
module GHC.Constants where
......
{-# LANGUAGE CPP
, NoImplicitPrelude
, Rank2Types
, ExistentialQuantification
#-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Desugar
......