diff --git a/Control/Monad/Primitive.hs b/Control/Monad/Primitive.hs index fcbd60d8..335802df 100644 --- a/Control/Monad/Primitive.hs +++ b/Control/Monad/Primitive.hs @@ -350,14 +350,14 @@ unsafeInlineST = unsafeInlinePrim touch :: PrimMonad m => a -> m () {-# INLINE touch #-} touch x = unsafePrimToPrim - $ (primitive (\s -> case touch# x s of { s' -> (# s', () #) }) :: IO ()) + (primitive (\s -> case touch# x s of { s' -> (# s', () #) }) :: IO ()) -- | Variant of 'touch' that keeps a value of an unlifted type -- (e.g. @MutableByteArray#@) alive. touchUnlifted :: forall (m :: Type -> Type) (a :: UnliftedType). PrimMonad m => a -> m () {-# INLINE touchUnlifted #-} touchUnlifted x = unsafePrimToPrim - $ (primitive (\s -> case touch# x s of { s' -> (# s', () #) }) :: IO ()) + (primitive (\s -> case touch# x s of { s' -> (# s', () #) }) :: IO ()) -- | Keep value @x@ alive until computation @k@ completes. -- Warning: This primop exists for completeness, but it is difficult to use diff --git a/Data/Primitive/ByteArray.hs b/Data/Primitive/ByteArray.hs index e1d4a8c1..30647cc7 100644 --- a/Data/Primitive/ByteArray.hs +++ b/Data/Primitive/ByteArray.hs @@ -4,6 +4,8 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE RankNTypes #-} +{-# OPTIONS_GHC -Wno-deprecations #-} + -- | -- Module : Data.Primitive.ByteArray -- Copyright : (c) Roman Leshchinskiy 2009-2012 diff --git a/Data/Primitive/Internal/Operations.hs b/Data/Primitive/Internal/Operations.hs index 626e9cc4..97bf901b 100644 --- a/Data/Primitive/Internal/Operations.hs +++ b/Data/Primitive/Internal/Operations.hs @@ -1,5 +1,5 @@ {-# LANGUAGE CPP, MagicHash, UnliftedFFITypes, UnboxedTuples #-} -{-# LANGUAGE RankNTypes, KindSignatures, ScopedTypeVariables #-} +{-# LANGUAGE RankNTypes, KindSignatures, ScopedTypeVariables #-} {-# LANGUAGE DataKinds #-} #if __GLASGOW_HASKELL__ < 806 {-# LANGUAGE TypeInType #-} diff --git a/Data/Primitive/MVar.hs b/Data/Primitive/MVar.hs index b1300d1f..eefb9f05 100644 --- a/Data/Primitive/MVar.hs +++ b/Data/Primitive/MVar.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} diff --git a/Data/Primitive/PrimArray.hs b/Data/Primitive/PrimArray.hs index 5200f66f..34b2e3a6 100644 --- a/Data/Primitive/PrimArray.hs +++ b/Data/Primitive/PrimArray.hs @@ -9,6 +9,8 @@ {-# LANGUAGE TemplateHaskellQuotes #-} {-# LANGUAGE RoleAnnotations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} + -- | -- Module : Data.Primitive.PrimArray -- Copyright : (c) Roman Leshchinskiy 2009-2012 diff --git a/Data/Primitive/Ptr.hs b/Data/Primitive/Ptr.hs index 011abc35..097fb091 100644 --- a/Data/Primitive/Ptr.hs +++ b/Data/Primitive/Ptr.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} diff --git a/Data/Primitive/SmallArray.hs b/Data/Primitive/SmallArray.hs index b33833af..04774a44 100644 --- a/Data/Primitive/SmallArray.hs +++ b/Data/Primitive/SmallArray.hs @@ -3,12 +3,12 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnboxedTuples #-} -{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE TemplateHaskellQuotes #-} +{-# OPTIONS_GHC -Wno-deprecations #-} + -- | -- Module : Data.Primitive.SmallArray -- Copyright: (c) 2015 Dan Doel diff --git a/bench/Array/Traverse/Closure.hs b/bench/Array/Traverse/Closure.hs index 4a7e64e7..0659c720 100644 --- a/bench/Array/Traverse/Closure.hs +++ b/bench/Array/Traverse/Closure.hs @@ -10,7 +10,7 @@ module Array.Traverse.Closure import Control.Applicative import Control.Monad.ST import Data.Primitive.Array -import GHC.Exts (Int(..),MutableArray#) +import GHC.Exts (MutableArray#) {-# INLINE traversePoly #-} traversePoly diff --git a/bench/PrimArray/Compare.hs b/bench/PrimArray/Compare.hs index 562da72b..b461010c 100644 --- a/bench/PrimArray/Compare.hs +++ b/bench/PrimArray/Compare.hs @@ -1,5 +1,4 @@ {-# LANGUAGE BangPatterns #-} -{-# LANGUAGE ScopedTypeVariables #-} module PrimArray.Compare ( benchmarkLt @@ -11,9 +10,6 @@ module PrimArray.Compare ) where import Data.Primitive -import Data.Word -import Control.Monad -import Control.Monad.ST (runST) import GHC.Exts (fromList) benchmarkLtDef :: PrimArray Int -> PrimArray Int -> Bool diff --git a/bench/main.hs b/bench/main.hs index c334e039..f3de0c38 100644 --- a/bench/main.hs +++ b/bench/main.hs @@ -1,10 +1,3 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE CPP #-} -{-# LANGUAGE KindSignatures #-} -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE UnboxedTuples #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} - import Test.Tasty.Bench import Control.Monad.ST import Data.Primitive diff --git a/test/Main.hs b/test/Main.hs index f85ba63d..07bb08e2 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -1,7 +1,6 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE KindSignatures #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -11,8 +10,6 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} #if __GLASGOW_HASKELL__ >= 805 -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DerivingVia #-} {-# LANGUAGE TypeInType #-} #endif