[commit: packages/array] master: Modernize `array` package via `{-# LANGUAGE #-}` pragmas (cc3eafa)

git at git.haskell.org git at git.haskell.org
Mon Sep 23 11:03:35 CEST 2013


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

On branch  : master
Link       : http://git.haskell.org/packages/array.git/commitdiff/cc3eafa21b93dfe52c131f4e8137cc402db71b28

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

commit cc3eafa21b93dfe52c131f4e8137cc402db71b28
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Sep 23 01:07:52 2013 +0200

    Modernize `array` package via `{-# LANGUAGE #-}` pragmas
    
    This converts the Cabal field `default-extensions`into
    `other-extensions` and adds explicit `{-# LANGUAGE #-}` pragmas
    to the respective modules.
    
    This also removes a few obsolete pre-Haddock-2 `#hide` pragmas.
    
    Note: The new `default-extensions` field lists extensions that are used
    in all modules in the component, while the `other-extensions` field
    lists extensions that are used in some modules, e.g. via the
    `{-# LANGUAGE #-}` pragma.
    
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


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

cc3eafa21b93dfe52c131f4e8137cc402db71b28
 Data/Array/Base.hs               |    4 ++--
 Data/Array/IO.hs                 |    1 +
 Data/Array/IO/Internals.hs       |    2 +-
 Data/Array/MArray.hs             |    2 ++
 Data/Array/MArray/Safe.hs        |    2 +-
 Data/Array/ST.hs                 |    1 +
 Data/Array/Storable/Internals.hs |    2 +-
 array.cabal                      |   13 ++++++-------
 8 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/Data/Array/Base.hs b/Data/Array/Base.hs
index 3298ac4..c1433fd 100644
--- a/Data/Array/Base.hs
+++ b/Data/Array/Base.hs
@@ -1,4 +1,5 @@
-{-# OPTIONS_GHC -XBangPatterns -fno-warn-unused-imports #-}
+{-# LANGUAGE BangPatterns, CPP, RankNTypes, MagicHash, UnboxedTuples, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, UnliftedFFITypes #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
 {-# OPTIONS_HADDOCK hide #-}
 -- XXX With a GHC 6.9 we get a spurious
 -- Data/Array/Base.hs:26:0:
@@ -22,7 +23,6 @@
 --
 -----------------------------------------------------------------------------
 
--- #hide
 module Data.Array.Base where
 
 import Control.Monad.ST.Lazy ( strictToLazyST )
diff --git a/Data/Array/IO.hs b/Data/Array/IO.hs
index ceaaedb..4b7bbf0 100644
--- a/Data/Array/IO.hs
+++ b/Data/Array/IO.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE MagicHash, UnliftedFFITypes #-}
 {-# OPTIONS_GHC -#include "HsBase.h" #-}
 {-# OPTIONS_GHC -w #-} --tmp
 -----------------------------------------------------------------------------
diff --git a/Data/Array/IO/Internals.hs b/Data/Array/IO/Internals.hs
index 1e9b3c8..6761e99 100644
--- a/Data/Array/IO/Internals.hs
+++ b/Data/Array/IO/Internals.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
 {-# OPTIONS_HADDOCK hide #-}
 -----------------------------------------------------------------------------
 -- |
@@ -13,7 +14,6 @@
 --
 -----------------------------------------------------------------------------
 
--- #hide
 module Data.Array.IO.Internals (
     IOArray(..),         -- instance of: Eq, Typeable
     IOUArray(..),        -- instance of: Eq, Typeable
diff --git a/Data/Array/MArray.hs b/Data/Array/MArray.hs
index 79cd057..99eb016 100644
--- a/Data/Array/MArray.hs
+++ b/Data/Array/MArray.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Array.MArray
diff --git a/Data/Array/MArray/Safe.hs b/Data/Array/MArray/Safe.hs
index e8e6254..7d9f515 100644
--- a/Data/Array/MArray/Safe.hs
+++ b/Data/Array/MArray/Safe.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE CPP, Trustworthy #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Array.MArray.Safe
diff --git a/Data/Array/ST.hs b/Data/Array/ST.hs
index 3ccca55..1b29bbb 100644
--- a/Data/Array/ST.hs
+++ b/Data/Array/ST.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE RankNTypes #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Array.ST
diff --git a/Data/Array/Storable/Internals.hs b/Data/Array/Storable/Internals.hs
index 647d00a..c401f2b 100644
--- a/Data/Array/Storable/Internals.hs
+++ b/Data/Array/Storable/Internals.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
 {-# OPTIONS_HADDOCK hide #-}
 -----------------------------------------------------------------------------
 -- |
@@ -13,7 +14,6 @@
 --
 -----------------------------------------------------------------------------
 
--- #hide
 module Data.Array.Storable.Internals (
     StorableArray(..),
     withStorableArray,
diff --git a/array.cabal b/array.cabal
index e1ad223..a81aec6 100644
--- a/array.cabal
+++ b/array.cabal
@@ -20,18 +20,17 @@ source-repository head
 
 library
   default-language: Haskell2010
-  default-extensions:
+  other-extensions:
+      BangPatterns,
       CPP,
-      MultiParamTypeClasses,
+      DeriveDataTypeable,
       FlexibleContexts,
       FlexibleInstances,
-      TypeSynonymInstances
-      DeriveDataTypeable,
-      StandaloneDeriving,
-      Rank2Types,
       MagicHash,
+      MultiParamTypeClasses,
+      RankNTypes,
+      Trustworthy,
       UnboxedTuples,
-      ForeignFunctionInterface,
       UnliftedFFITypes
   build-depends: base >= 4.7 && < 5
   exposed-modules:




More information about the ghc-commits mailing list