[commit: packages/unix] master, safefixes710again: Tighten Safe Haskell bounds, fixes new warning in GHC 7.10. (7222765)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 15:50:36 UTC 2015


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

On branches: master,safefixes710again
Link       : http://ghc.haskell.org/trac/ghc/changeset/7222765c40868100e2527ec7c4a0832e68a786a0/unix

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

commit 7222765c40868100e2527ec7c4a0832e68a786a0
Author: David Terei <code at davidterei.com>
Date:   Wed Nov 12 18:12:18 2014 -0800

    Tighten Safe Haskell bounds, fixes new warning in GHC 7.10.
    
    Closes #27


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

7222765c40868100e2527ec7c4a0832e68a786a0
 System/Posix/DynamicLinker/Module.hsc | 4 +++-
 System/Posix/DynamicLinker/Prim.hsc   | 3 +++
 System/Posix/Env.hsc                  | 4 +++-
 System/Posix/IO.hsc                   | 4 +++-
 System/Posix/IO/ByteString.hsc        | 4 +++-
 System/Posix/SharedMem.hsc            | 4 +++-
 System/Posix/Temp.hsc                 | 4 +++-
 System/Posix/Temp/ByteString.hsc      | 4 +++-
 changelog.md                          | 1 +
 9 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/System/Posix/DynamicLinker/Module.hsc b/System/Posix/DynamicLinker/Module.hsc
index aa83b6b..aa18d83 100644
--- a/System/Posix/DynamicLinker/Module.hsc
+++ b/System/Posix/DynamicLinker/Module.hsc
@@ -1,4 +1,6 @@
-#ifdef __GLASGOW_HASKELL__
+#if __GLASGOW_HASKELL__ >= 709
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 703
 {-# LANGUAGE Trustworthy #-}
 #endif
 -----------------------------------------------------------------------------
diff --git a/System/Posix/DynamicLinker/Prim.hsc b/System/Posix/DynamicLinker/Prim.hsc
index 0bef60b..9e4dde7 100644
--- a/System/Posix/DynamicLinker/Prim.hsc
+++ b/System/Posix/DynamicLinker/Prim.hsc
@@ -1,5 +1,8 @@
 #ifdef __GLASGOW_HASKELL__
 {-# LANGUAGE Trustworthy #-}
+#if __GLASGOW_HASKELL__ >= 709
+{-# OPTIONS_GHC -fno-warn-trustworthy-safe #-}
+#endif
 #endif
 -----------------------------------------------------------------------------
 -- |
diff --git a/System/Posix/Env.hsc b/System/Posix/Env.hsc
index 557bc57..95b7bc8 100644
--- a/System/Posix/Env.hsc
+++ b/System/Posix/Env.hsc
@@ -1,4 +1,6 @@
-#ifdef __GLASGOW_HASKELL__
+#if __GLASGOW_HASKELL__ >= 709
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 703
 {-# LANGUAGE Trustworthy #-}
 #endif
 -----------------------------------------------------------------------------
diff --git a/System/Posix/IO.hsc b/System/Posix/IO.hsc
index eeabb24..41e0b3b 100644
--- a/System/Posix/IO.hsc
+++ b/System/Posix/IO.hsc
@@ -1,4 +1,6 @@
-#ifdef __GLASGOW_HASKELL__
+#if __GLASGOW_HASKELL__ >= 709
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 703
 {-# LANGUAGE Trustworthy #-}
 #endif
 -----------------------------------------------------------------------------
diff --git a/System/Posix/IO/ByteString.hsc b/System/Posix/IO/ByteString.hsc
index 87dfad6..b8bc87a 100644
--- a/System/Posix/IO/ByteString.hsc
+++ b/System/Posix/IO/ByteString.hsc
@@ -1,4 +1,6 @@
-#ifdef __GLASGOW_HASKELL__
+#if __GLASGOW_HASKELL__ >= 709
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 703
 {-# LANGUAGE Trustworthy #-}
 #endif
 -----------------------------------------------------------------------------
diff --git a/System/Posix/SharedMem.hsc b/System/Posix/SharedMem.hsc
index c85e4b7..ff43b97 100644
--- a/System/Posix/SharedMem.hsc
+++ b/System/Posix/SharedMem.hsc
@@ -1,4 +1,6 @@
-#ifdef __GLASGOW_HASKELL__
+#if __GLASGOW_HASKELL__ >= 709
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 703
 {-# LANGUAGE Trustworthy #-}
 #endif
 -----------------------------------------------------------------------------
diff --git a/System/Posix/Temp.hsc b/System/Posix/Temp.hsc
index c27645f..349030b 100644
--- a/System/Posix/Temp.hsc
+++ b/System/Posix/Temp.hsc
@@ -1,4 +1,6 @@
-#ifdef __GLASGOW_HASKELL__
+#if __GLASGOW_HASKELL__ >= 709
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 703
 {-# LANGUAGE Trustworthy #-}
 #endif
 -----------------------------------------------------------------------------
diff --git a/System/Posix/Temp/ByteString.hsc b/System/Posix/Temp/ByteString.hsc
index 7323012..61bd7e9 100644
--- a/System/Posix/Temp/ByteString.hsc
+++ b/System/Posix/Temp/ByteString.hsc
@@ -1,4 +1,6 @@
-#ifdef __GLASGOW_HASKELL__
+#if __GLASGOW_HASKELL__ >= 709
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 703
 {-# LANGUAGE Trustworthy #-}
 #endif
 -----------------------------------------------------------------------------
diff --git a/changelog.md b/changelog.md
index 6ef8de8..d5100cf 100644
--- a/changelog.md
+++ b/changelog.md
@@ -3,6 +3,7 @@
 ## 2.7.0.2  *TBA*
 
   * Add support for `base-4.8.0.0`
+  * Tighten `SafeHaskell` bounds for GHC 7.10+
   * Add haddock comments on `RTLD_NEXT` and `RTLD_DEFAULT`
   * Deprecate function `haveRtldLocal`
   * Fix `getGroupEntryForID/getGroupEntryForName' on Solaris. Solaris uses



More information about the ghc-commits mailing list