[commit: packages/binary] master: Declare a few modules as Safe rather than Trustworthy. (5714385)

git at git.haskell.org git at git.haskell.org
Wed Dec 16 09:42:29 UTC 2015


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

On branch  : master
Link       : http://git.haskell.org/packages/binary.git/commitdiff/571438513fdf060e56fd73883c590a926fdde948

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

commit 571438513fdf060e56fd73883c590a926fdde948
Author: Mathieu Boespflug <m at tweag.io>
Date:   Sat Jun 6 23:31:29 2015 +0200

    Declare a few modules as Safe rather than Trustworthy.
    
    This silences a GHC 7.10 warning that indicates that these modules are
    marked trustworthy when in fact they don't need to, since they are safe.


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

571438513fdf060e56fd73883c590a926fdde948
 src/Data/Binary/Class.hs   | 5 +++--
 src/Data/Binary/Generic.hs | 2 +-
 src/Data/Binary/Put.hs     | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/Data/Binary/Class.hs b/src/Data/Binary/Class.hs
index 4259165..0807c5f 100644
--- a/src/Data/Binary/Class.hs
+++ b/src/Data/Binary/Class.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE CPP, FlexibleContexts #-}
 #if __GLASGOW_HASKELL__ >= 701
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 #ifdef GENERICS
 {-# LANGUAGE DefaultSignatures #-}
@@ -41,12 +41,13 @@ module Data.Binary.Class (
     ) where
 
 import Data.Word
+import Data.Bits
+import Data.Int
 
 import Data.Binary.Put
 import Data.Binary.Get
 
 import Control.Monad
-import Foreign
 
 import Data.ByteString.Lazy (ByteString)
 import qualified Data.ByteString.Lazy as L
diff --git a/src/Data/Binary/Generic.hs b/src/Data/Binary/Generic.hs
index e1a3a1c..2077772 100644
--- a/src/Data/Binary/Generic.hs
+++ b/src/Data/Binary/Generic.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE BangPatterns, CPP, FlexibleInstances, KindSignatures,
-    ScopedTypeVariables, Trustworthy, TypeOperators, TypeSynonymInstances #-}
+    ScopedTypeVariables, Safe, TypeOperators, TypeSynonymInstances #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 
 -----------------------------------------------------------------------------
diff --git a/src/Data/Binary/Put.hs b/src/Data/Binary/Put.hs
index 004c15a..112d145 100644
--- a/src/Data/Binary/Put.hs
+++ b/src/Data/Binary/Put.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE CPP #-}
 #if __GLASGOW_HASKELL__ >= 701
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 #endif
 
 -----------------------------------------------------------------------------



More information about the ghc-commits mailing list