diff options
author | Hécate <hecate+gitlab@glitchbra.in> | 2020-08-01 18:40:12 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-08-05 04:01:15 -0400 |
commit | eb7013c3037538aa9c947a21dbbfd7c297929ac8 (patch) | |
tree | bf0c1471f24ffe068559405be11d863033aea473 | |
parent | 53ce0db5a06598c88c6b8cb32043b878e7083dd4 (diff) | |
download | haskell-eb7013c3037538aa9c947a21dbbfd7c297929ac8.tar.gz |
Remove all the unnecessary LANGUAGE pragmas
60 files changed, 160 insertions, 188 deletions
diff --git a/libraries/base/.hlint.yaml b/libraries/base/.hlint.yaml index f596a4a30b..6ebe02e94c 100644 --- a/libraries/base/.hlint.yaml +++ b/libraries/base/.hlint.yaml @@ -3,3 +3,5 @@ ########################## - ignore: {} +- warn: {name: Unused LANGUAGE pragma} +- warn: {name: Use fewer LANGUAGE pragmas} diff --git a/libraries/base/Control/Concurrent/QSemN.hs b/libraries/base/Control/Concurrent/QSemN.hs index 41d2b0ab73..ea3236b0a4 100644 --- a/libraries/base/Control/Concurrent/QSemN.hs +++ b/libraries/base/Control/Concurrent/QSemN.hs @@ -1,5 +1,4 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/Control/Exception/Base.hs b/libraries/base/Control/Exception/Base.hs index a009004879..0d69d6f272 100644 --- a/libraries/base/Control/Exception/Base.hs +++ b/libraries/base/Control/Exception/Base.hs @@ -1,6 +1,6 @@ -{-# LANGUAGE Trustworthy #-} -{-# LANGUAGE NoImplicitPrelude, MagicHash #-} -{-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | @@ -99,15 +99,15 @@ module Control.Exception.Base ( nonTermination, nestedAtomically, ) where -import GHC.Base -import GHC.IO hiding (bracket,finally,onException) -import GHC.IO.Exception -import GHC.Exception -import GHC.Show +import GHC.Base +import GHC.Exception +import GHC.IO hiding (bracket, finally, onException) +import GHC.IO.Exception +import GHC.Show -- import GHC.Exception hiding ( Exception ) -import GHC.Conc.Sync +import GHC.Conc.Sync -import Data.Either +import Data.Either ----------------------------------------------------------------------------- -- Catching exceptions diff --git a/libraries/base/Data/Coerce.hs b/libraries/base/Data/Coerce.hs index 3785b8a104..2cfb4c9208 100644 --- a/libraries/base/Data/Coerce.hs +++ b/libraries/base/Data/Coerce.hs @@ -1,6 +1,5 @@ {-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE MagicHash #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Data/Complex.hs b/libraries/base/Data/Complex.hs index b32844057d..c9b8040f92 100644 --- a/libraries/base/Data/Complex.hs +++ b/libraries/base/Data/Complex.hs @@ -1,6 +1,5 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs index a8dfa61115..4ede199e39 100644 --- a/libraries/base/Data/Data.hs +++ b/libraries/base/Data/Data.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} diff --git a/libraries/base/Data/Dynamic.hs b/libraries/base/Data/Dynamic.hs index 5a4f3f9a08..8345e16854 100644 --- a/libraries/base/Data/Dynamic.hs +++ b/libraries/base/Data/Dynamic.hs @@ -1,9 +1,7 @@ -{-# LANGUAGE Trustworthy #-} -{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE GADTs #-} -{-# LANGUAGE ExplicitForAll #-} -{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeApplications #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/Data/Either.hs b/libraries/base/Data/Either.hs index afd676d415..8e63017db8 100644 --- a/libraries/base/Data/Either.hs +++ b/libraries/base/Data/Either.hs @@ -1,8 +1,10 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE StandaloneDeriving #-} -{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, TypeOperators, UndecidableInstances #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UndecidableInstances #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Data/Functor/Compose.hs b/libraries/base/Data/Functor/Compose.hs index d8369ebc05..e0879acdad 100644 --- a/libraries/base/Data/Functor/Compose.hs +++ b/libraries/base/Data/Functor/Compose.hs @@ -4,7 +4,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE TypeOperators #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Compose diff --git a/libraries/base/Data/Functor/Contravariant.hs b/libraries/base/Data/Functor/Contravariant.hs index 34a8574b98..6ac9f38f81 100644 --- a/libraries/base/Data/Functor/Contravariant.hs +++ b/libraries/base/Data/Functor/Contravariant.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DerivingVia #-} {-# LANGUAGE EmptyCase #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} diff --git a/libraries/base/Data/Functor/Identity.hs b/libraries/base/Data/Functor/Identity.hs index 0709393616..60fb0f3305 100644 --- a/libraries/base/Data/Functor/Identity.hs +++ b/libraries/base/Data/Functor/Identity.hs @@ -1,6 +1,4 @@ -{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} diff --git a/libraries/base/Data/IORef.hs b/libraries/base/Data/IORef.hs index 2886e594d3..509fb139a4 100644 --- a/libraries/base/Data/IORef.hs +++ b/libraries/base/Data/IORef.hs @@ -1,7 +1,7 @@ +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} -{-# LANGUAGE BangPatterns #-} - +{-# LANGUAGE UnboxedTuples #-} ----------------------------------------------------------------------------- -- | -- Module : Data.IORef @@ -17,7 +17,7 @@ ----------------------------------------------------------------------------- module Data.IORef - ( + ( -- * IORefs IORef, -- abstract, instance of: Eq, Typeable newIORef, diff --git a/libraries/base/Data/List/NonEmpty.hs b/libraries/base/Data/List/NonEmpty.hs index 1b80469003..84481adb81 100644 --- a/libraries/base/Data/List/NonEmpty.hs +++ b/libraries/base/Data/List/NonEmpty.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE Trustworthy #-} -- can't use Safe due to IsList instance {-# LANGUAGE TypeFamilies #-} diff --git a/libraries/base/Data/Semigroup.hs b/libraries/base/Data/Semigroup.hs index fde9706416..490f472fe1 100644 --- a/libraries/base/Data/Semigroup.hs +++ b/libraries/base/Data/Semigroup.hs @@ -1,13 +1,10 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE TypeOperators #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Data/Type/Bool.hs b/libraries/base/Data/Type/Bool.hs index 4309b6d0e3..24c694699f 100644 --- a/libraries/base/Data/Type/Bool.hs +++ b/libraries/base/Data/Type/Bool.hs @@ -1,5 +1,9 @@ -{-# LANGUAGE TypeFamilyDependencies, Safe, PolyKinds #-} -{-# LANGUAGE TypeFamilies, TypeOperators, DataKinds, NoImplicitPrelude #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE Safe #-} +{-# LANGUAGE TypeFamilyDependencies #-} +{-# LANGUAGE TypeOperators #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Data/Type/Coercion.hs b/libraries/base/Data/Type/Coercion.hs index 694bedec01..6914864857 100644 --- a/libraries/base/Data/Type/Coercion.hs +++ b/libraries/base/Data/Type/Coercion.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -8,7 +7,6 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} -{-# LANGUAGE MagicHash #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Data/Type/Equality.hs b/libraries/base/Data/Type/Equality.hs index ab321ba011..de7deb3da2 100644 --- a/libraries/base/Data/Type/Equality.hs +++ b/libraries/base/Data/Type/Equality.hs @@ -1,19 +1,16 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE TypeOperators #-} -{-# LANGUAGE GADTs #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE StandaloneDeriving #-} -{-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE RankNTypes #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE UndecidableInstances #-} -{-# LANGUAGE ExplicitNamespaces #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE FunctionalDependencies #-} -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE StandaloneKindSignatures #-} -{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Data/Typeable.hs b/libraries/base/Data/Typeable.hs index 2b4d63b271..43c9aa187d 100644 --- a/libraries/base/Data/Typeable.hs +++ b/libraries/base/Data/Typeable.hs @@ -1,10 +1,9 @@ -{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE ConstraintKinds #-} -{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeOperators #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/Data/Unique.hs b/libraries/base/Data/Unique.hs index bdadd5eccd..95b94102d1 100644 --- a/libraries/base/Data/Unique.hs +++ b/libraries/base/Data/Unique.hs @@ -1,5 +1,4 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE MagicHash #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Data/Void.hs b/libraries/base/Data/Void.hs index 5c2886889b..7558308cd3 100644 --- a/libraries/base/Data/Void.hs +++ b/libraries/base/Data/Void.hs @@ -3,7 +3,6 @@ {-# LANGUAGE EmptyCase #-} {-# LANGUAGE EmptyDataDeriving #-} {-# LANGUAGE Safe #-} -{-# LANGUAGE StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Foreign/C/Types.hs b/libraries/base/Foreign/C/Types.hs index 29a4498566..e2907ca2d8 100644 --- a/libraries/base/Foreign/C/Types.hs +++ b/libraries/base/Foreign/C/Types.hs @@ -1,9 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE MagicHash #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_GHC -Wno-unused-binds #-} -- XXX -Wno-unused-binds stops us warning about unused constructors, diff --git a/libraries/base/Foreign/Ptr.hs b/libraries/base/Foreign/Ptr.hs index 6a8170baea..6efe8908cf 100644 --- a/libraries/base/Foreign/Ptr.hs +++ b/libraries/base/Foreign/Ptr.hs @@ -3,7 +3,6 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs index e344f842df..f51ed4fa68 100644 --- a/libraries/base/GHC/Base.hs +++ b/libraries/base/GHC/Base.hs @@ -62,19 +62,17 @@ GHC.Float Classes: Floating, RealFloat Other Prelude modules are much easier with fewer complex dependencies. -} +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE Unsafe #-} -{-# LANGUAGE CPP - , NoImplicitPrelude - , BangPatterns - , ExplicitForAll - , MagicHash - , UnboxedTuples - , ExistentialQuantification - , RankNTypes - , KindSignatures - , PolyKinds - , DataKinds - #-} + -- -Wno-orphans is needed for things like: -- Orphan rule: "x# -# x#" ALWAYS forall x# :: Int# -# x# x# = 0 {-# OPTIONS_GHC -Wno-orphans #-} diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs index a15e91f956..af7c22f055 100644 --- a/libraries/base/GHC/Conc/Sync.hs +++ b/libraries/base/GHC/Conc/Sync.hs @@ -1,13 +1,11 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE UnboxedTuples #-} +{-# LANGUAGE UnliftedFFITypes #-} {-# LANGUAGE Unsafe #-} -{-# LANGUAGE CPP - , NoImplicitPrelude - , BangPatterns - , MagicHash - , UnboxedTuples - , UnliftedFFITypes - , StandaloneDeriving - , RankNTypes - #-} + {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Conc/WinIO.hs b/libraries/base/GHC/Conc/WinIO.hs index d0325910b1..5fdb9fba86 100644 --- a/libraries/base/GHC/Conc/WinIO.hs +++ b/libraries/base/GHC/Conc/WinIO.hs @@ -1,5 +1,7 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-} + {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Event/Manager.hs b/libraries/base/GHC/Event/Manager.hs index 51306795fe..b680a54e77 100644 --- a/libraries/base/GHC/Event/Manager.hs +++ b/libraries/base/GHC/Event/Manager.hs @@ -1,12 +1,10 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE BangPatterns - , CPP - , ExistentialQuantification - , NoImplicitPrelude - , RecordWildCards - , TypeSynonymInstances - , FlexibleInstances - #-} -- | -- The event manager supports event notification on fds. Each fd may diff --git a/libraries/base/GHC/Event/PSQ.hs b/libraries/base/GHC/Event/PSQ.hs index 55a39fcb81..25c5352880 100644 --- a/libraries/base/GHC/Event/PSQ.hs +++ b/libraries/base/GHC/Event/PSQ.hs @@ -1,11 +1,7 @@ -{-# LANGUAGE Trustworthy #-} -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} -{-# LANGUAGE DeriveFoldable #-} -{-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE UnboxedTuples #-} module GHC.Event.PSQ diff --git a/libraries/base/GHC/Event/TimerManager.hs b/libraries/base/GHC/Event/TimerManager.hs index c6518d8cba..4cac18d9a0 100644 --- a/libraries/base/GHC/Event/TimerManager.hs +++ b/libraries/base/GHC/Event/TimerManager.hs @@ -1,11 +1,10 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE BangPatterns - , CPP - , ExistentialQuantification - , NoImplicitPrelude - , TypeSynonymInstances - , FlexibleInstances - #-} + -- TODO: use the new Windows IO manager module GHC.Event.TimerManager ( -- * Types diff --git a/libraries/base/GHC/Event/Windows/ManagedThreadPool.hs b/libraries/base/GHC/Event/Windows/ManagedThreadPool.hs index 94e498b58e..a81ac331d2 100644 --- a/libraries/base/GHC/Event/Windows/ManagedThreadPool.hs +++ b/libraries/base/GHC/Event/Windows/ManagedThreadPool.hs @@ -1,10 +1,8 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DoAndIfThenElse #-} -{-# LANGUAGE ForeignFunctionInterface #-} -{-# LANGUAGE EmptyDataDecls #-} -{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE RecordWildCards #-} ------------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/Exception/Type.hs b/libraries/base/GHC/Exception/Type.hs index d8ab4ba438..642e1a9889 100644 --- a/libraries/base/GHC/Exception/Type.hs +++ b/libraries/base/GHC/Exception/Type.hs @@ -1,10 +1,7 @@ +{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE NoImplicitPrelude - , ExistentialQuantification - , MagicHash - , RecordWildCards - , PatternSynonyms - #-} + {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs index 5a09d421d1..fc8bb1ef0c 100755 --- a/libraries/base/GHC/Exts.hs +++ b/libraries/base/GHC/Exts.hs @@ -1,6 +1,10 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE Unsafe #-} -{-# LANGUAGE MagicHash, UnboxedTuples, TypeFamilies, DeriveDataTypeable, - MultiParamTypeClasses, FlexibleInstances, NoImplicitPrelude #-} {-# OPTIONS_HADDOCK not-home #-} diff --git a/libraries/base/GHC/Fingerprint.hs b/libraries/base/GHC/Fingerprint.hs index d01128056e..18bf0f9b36 100644 --- a/libraries/base/GHC/Fingerprint.hs +++ b/libraries/base/GHC/Fingerprint.hs @@ -1,8 +1,6 @@ -{-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP - , NoImplicitPrelude - , BangPatterns - #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE Trustworthy #-} -- ---------------------------------------------------------------------------- -- diff --git a/libraries/base/GHC/ForeignPtr.hs b/libraries/base/GHC/ForeignPtr.hs index 27e83f453f..718b5a8749 100644 --- a/libraries/base/GHC/ForeignPtr.hs +++ b/libraries/base/GHC/ForeignPtr.hs @@ -1,11 +1,10 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE Unsafe #-} -{-# LANGUAGE NoImplicitPrelude - , BangPatterns - , MagicHash - , UnboxedTuples - #-} + {-# OPTIONS_HADDOCK not-home #-} -{-# LANGUAGE StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/Generics.hs b/libraries/base/GHC/Generics.hs index c175d9ee7b..9ea223bd9b 100644 --- a/libraries/base/GHC/Generics.hs +++ b/libraries/base/GHC/Generics.hs @@ -7,7 +7,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE KindSignatures #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} @@ -16,7 +15,6 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} -{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE UndecidableInstances #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/IO/Device.hs b/libraries/base/GHC/IO/Device.hs index 0f244ae626..7317495a85 100644 --- a/libraries/base/GHC/IO/Device.hs +++ b/libraries/base/GHC/IO/Device.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE NoImplicitPrelude, BangPatterns #-} +{-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/IO/Encoding/CodePage.hs b/libraries/base/GHC/IO/Encoding/CodePage.hs index ef03e985fa..8393f795d7 100644 --- a/libraries/base/GHC/IO/Encoding/CodePage.hs +++ b/libraries/base/GHC/IO/Encoding/CodePage.hs @@ -1,6 +1,7 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, BangPatterns, NoImplicitPrelude, - NondecreasingIndentation, MagicHash #-} module GHC.IO.Encoding.CodePage( #if defined(mingw32_HOST_OS) diff --git a/libraries/base/GHC/IO/Handle/Lock.hs b/libraries/base/GHC/IO/Handle/Lock.hs index 6d8938c35d..18319e1d29 100644 --- a/libraries/base/GHC/IO/Handle/Lock.hs +++ b/libraries/base/GHC/IO/Handle/Lock.hs @@ -1,7 +1,5 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE InterruptibleFFI #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NoImplicitPrelude #-} module GHC.IO.Handle.Lock ( diff --git a/libraries/base/GHC/Int.hs b/libraries/base/GHC/Int.hs index 1614481e89..5449a79c8f 100644 --- a/libraries/base/GHC/Int.hs +++ b/libraries/base/GHC/Int.hs @@ -1,6 +1,11 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NegativeLiterals #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash, UnboxedTuples, - StandaloneDeriving, NegativeLiterals #-} +{-# LANGUAGE UnboxedTuples #-} + {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Ix.hs b/libraries/base/GHC/Ix.hs index 6080f1e9b4..5d7b74ff30 100644 --- a/libraries/base/GHC/Ix.hs +++ b/libraries/base/GHC/Ix.hs @@ -1,4 +1,6 @@ -{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} + {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs index f3f2ad5909..732ba13848 100644 --- a/libraries/base/GHC/List.hs +++ b/libraries/base/GHC/List.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, MagicHash #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} diff --git a/libraries/base/GHC/OverloadedLabels.hs b/libraries/base/GHC/OverloadedLabels.hs index aa0d1b53d3..129daab30e 100644 --- a/libraries/base/GHC/OverloadedLabels.hs +++ b/libraries/base/GHC/OverloadedLabels.hs @@ -1,11 +1,9 @@ -{-# LANGUAGE AllowAmbiguousTypes - , DataKinds - , FlexibleInstances - , KindSignatures - , MultiParamTypeClasses - , ScopedTypeVariables - , TypeApplications - #-} +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/Records.hs b/libraries/base/GHC/Records.hs index 8ac8b680e2..b3f02e46c4 100644 --- a/libraries/base/GHC/Records.hs +++ b/libraries/base/GHC/Records.hs @@ -1,9 +1,6 @@ -{-# LANGUAGE AllowAmbiguousTypes - , FunctionalDependencies - , KindSignatures - , MultiParamTypeClasses - , PolyKinds - #-} +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE FunctionalDependencies #-} +{-# LANGUAGE PolyKinds #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/GHC/StableName.hs b/libraries/base/GHC/StableName.hs index f7eb4e40b4..13671cf214 100644 --- a/libraries/base/GHC/StableName.hs +++ b/libraries/base/GHC/StableName.hs @@ -1,6 +1,5 @@ -{-# LANGUAGE Trustworthy #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE MagicHash #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE UnboxedTuples #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Stack.hs b/libraries/base/GHC/Stack.hs index 1f102c9f9b..007db83b42 100644 --- a/libraries/base/GHC/Stack.hs +++ b/libraries/base/GHC/Stack.hs @@ -1,3 +1,6 @@ +{-# LANGUAGE ImplicitParams #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE RankNTypes #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- @@ -15,7 +18,6 @@ -- @since 4.5.0.0 ----------------------------------------------------------------------------- -{-# LANGUAGE MagicHash, NoImplicitPrelude, ImplicitParams, RankNTypes #-} module GHC.Stack ( errorWithStackTrace, diff --git a/libraries/base/GHC/Stack/Types.hs b/libraries/base/GHC/Stack/Types.hs index 265b3c75b8..4144448e96 100644 --- a/libraries/base/GHC/Stack/Types.hs +++ b/libraries/base/GHC/Stack/Types.hs @@ -1,7 +1,6 @@ -{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ImplicitParams #-} -{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Trustworthy #-} diff --git a/libraries/base/GHC/TopHandler.hs b/libraries/base/GHC/TopHandler.hs index 4997d827f5..ba86798091 100644 --- a/libraries/base/GHC/TopHandler.hs +++ b/libraries/base/GHC/TopHandler.hs @@ -1,10 +1,9 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP - , NoImplicitPrelude - , MagicHash - , UnboxedTuples - , UnliftedFFITypes - #-} +{-# LANGUAGE UnliftedFFITypes #-} + {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/TypeLits.hs b/libraries/base/GHC/TypeLits.hs index 206e53de11..146d24f05b 100644 --- a/libraries/base/GHC/TypeLits.hs +++ b/libraries/base/GHC/TypeLits.hs @@ -1,6 +1,5 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE DataKinds #-} -{-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} @@ -14,7 +13,6 @@ {-# LANGUAGE PolyKinds #-} {-| - GHC's @DataKinds@ language extension lifts data constructors, natural numbers, and strings to the type level. This module provides the primitives needed for working with type-level numbers (the 'Nat' kind) diff --git a/libraries/base/GHC/TypeNats.hs b/libraries/base/GHC/TypeNats.hs index 5d06320fac..065f3a0aca 100644 --- a/libraries/base/GHC/TypeNats.hs +++ b/libraries/base/GHC/TypeNats.hs @@ -1,6 +1,5 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE DataKinds #-} -{-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE NoStarIsType #-} diff --git a/libraries/base/GHC/Unicode.hs b/libraries/base/GHC/Unicode.hs index 6fba91f0e2..a3fcbf55f4 100644 --- a/libraries/base/GHC/Unicode.hs +++ b/libraries/base/GHC/Unicode.hs @@ -1,5 +1,7 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, StandaloneDeriving #-} + {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Weak.hs b/libraries/base/GHC/Weak.hs index dfe2dd8b4a..9ec05456c2 100644 --- a/libraries/base/GHC/Weak.hs +++ b/libraries/base/GHC/Weak.hs @@ -1,10 +1,9 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE Unsafe #-} -{-# LANGUAGE NoImplicitPrelude - , BangPatterns - , MagicHash - , UnboxedTuples - , StandaloneDeriving - #-} + {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/System/Posix/Types.hs b/libraries/base/System/Posix/Types.hs index ed1d14f2b5..04db747eb7 100644 --- a/libraries/base/System/Posix/Types.hs +++ b/libraries/base/System/Posix/Types.hs @@ -1,9 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE MagicHash #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- diff --git a/libraries/base/System/Timeout.hs b/libraries/base/System/Timeout.hs index 1c41dc2ca2..cc89bfed40 100644 --- a/libraries/base/System/Timeout.hs +++ b/libraries/base/System/Timeout.hs @@ -1,6 +1,5 @@ -{-# LANGUAGE Safe #-} {-# LANGUAGE CPP #-} -{-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE Safe #-} ------------------------------------------------------------------------------- -- | diff --git a/libraries/base/Unsafe/Coerce.hs b/libraries/base/Unsafe/Coerce.hs index 9cd9ef8896..0e899ef37a 100644 --- a/libraries/base/Unsafe/Coerce.hs +++ b/libraries/base/Unsafe/Coerce.hs @@ -3,9 +3,15 @@ -- Note [Implementing unsafeCoerce] {-# OPTIONS_GHC -fno-strictness #-} -{-# LANGUAGE Unsafe, NoImplicitPrelude, MagicHash, GADTs, TypeApplications, - ScopedTypeVariables, TypeOperators, KindSignatures, PolyKinds, - StandaloneKindSignatures, DataKinds #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneKindSignatures #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE Unsafe #-} module Unsafe.Coerce ( unsafeCoerce, unsafeCoerceUnlifted, unsafeCoerceAddr diff --git a/libraries/base/tests/CatPairs.hs b/libraries/base/tests/CatPairs.hs index bcc85e4ea7..daf67bc653 100644 --- a/libraries/base/tests/CatPairs.hs +++ b/libraries/base/tests/CatPairs.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE PolyKinds, DataKinds, KindSignatures #-} +{-# LANGUAGE PolyKinds, DataKinds #-} {-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-} module CatPairs where diff --git a/libraries/base/tests/Concurrent/ThreadDelay001.hs b/libraries/base/tests/Concurrent/ThreadDelay001.hs index fb4385be31..1ab2d33978 100644 --- a/libraries/base/tests/Concurrent/ThreadDelay001.hs +++ b/libraries/base/tests/Concurrent/ThreadDelay001.hs @@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE BangPatterns #-} + -- Test that threadDelay actually sleeps for (at least) as long as we -- ask it diff --git a/libraries/base/tests/IO/T4144.hs b/libraries/base/tests/IO/T4144.hs index 1fc16c0f07..4656471794 100644 --- a/libraries/base/tests/IO/T4144.hs +++ b/libraries/base/tests/IO/T4144.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} +{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Control.Applicative diff --git a/libraries/base/tests/T13191.hs b/libraries/base/tests/T13191.hs index b492b608bc..d64fa71e24 100644 --- a/libraries/base/tests/T13191.hs +++ b/libraries/base/tests/T13191.hs @@ -1,8 +1,11 @@ -- To test with GHC before liftA2 was added to the Applicative -- class, remove the definition of liftA2 here, and import -- liftA2 separately from Control.Applicative. -{-# LANGUAGE DeriveTraversable, GADTs, DataKinds, - DeriveFunctor, StandaloneDeriving #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveTraversable #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE StandaloneDeriving #-} + module Main where import Control.Applicative (Applicative (..)) diff --git a/libraries/base/tests/T5943.hs b/libraries/base/tests/T5943.hs index 88fa24d65b..f7193c1379 100644 --- a/libraries/base/tests/T5943.hs +++ b/libraries/base/tests/T5943.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} - import Control.Monad import Control.Monad.Fix import Data.IORef diff --git a/libraries/base/tests/foldableArray.hs b/libraries/base/tests/foldableArray.hs index c5699f240f..92217d73d2 100644 --- a/libraries/base/tests/foldableArray.hs +++ b/libraries/base/tests/foldableArray.hs @@ -1,8 +1,9 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} -{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE CPP #-} + module Main where + import Prelude hiding (foldr, foldl, foldl', foldr1, foldl1, length, null, sum, product, all, any, and, or) import Data.Foldable diff --git a/libraries/base/tests/isValidNatural.hs b/libraries/base/tests/isValidNatural.hs index a9b48c82e2..d0ae899de8 100644 --- a/libraries/base/tests/isValidNatural.hs +++ b/libraries/base/tests/isValidNatural.hs @@ -1,4 +1,5 @@ -{-# language MagicHash, UnboxedTuples #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE UnboxedTuples #-} import GHC.Num.Natural import GHC.Num.BigNat |