Repository : ssh://g...@git.haskell.org/bytestring On branch : ghc-head Link : http://git.haskell.org/packages/bytestring.git/commitdiff/c521a7821bb8d0a8ce372cabd132e220e4464348
>--------------------------------------------------------------- commit c521a7821bb8d0a8ce372cabd132e220e4464348 Author: David Terei <davidte...@gmail.com> Date: Mon Jul 15 12:26:23 2013 -0700 Add trustworthy pragmas to various safe builder modules and also make internal modules that expose ByteString constructors unsafe. >--------------------------------------------------------------- c521a7821bb8d0a8ce372cabd132e220e4464348 Data/ByteString/Builder.hs | 3 +++ Data/ByteString/Builder/ASCII.hs | 3 +++ Data/ByteString/Builder/Extra.hs | 3 +++ Data/ByteString/Builder/Internal.hs | 3 +++ Data/ByteString/Builder/Prim.hs | 3 +++ Data/ByteString/Builder/Prim/Internal.hs | 3 +++ Data/ByteString/Internal.hs | 3 +++ Data/ByteString/Lazy/Internal.hs | 3 +++ 8 files changed, 24 insertions(+) diff --git a/Data/ByteString/Builder.hs b/Data/ByteString/Builder.hs index dc7e6f2..d491c2a 100644 --- a/Data/ByteString/Builder.hs +++ b/Data/ByteString/Builder.hs @@ -1,5 +1,8 @@ {-# LANGUAGE CPP, BangPatterns #-} {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-orphans #-} +#if __GLASGOW_HASKELL__ >= 701 +{-# LANGUAGE Trustworthy #-} +#endif {- | Copyright : (c) 2010 Jasper Van der Jeugt (c) 2010 - 2011 Simon Meier License : BSD3-style (see LICENSE) diff --git a/Data/ByteString/Builder/ASCII.hs b/Data/ByteString/Builder/ASCII.hs index d20015e..3ad894f 100644 --- a/Data/ByteString/Builder/ASCII.hs +++ b/Data/ByteString/Builder/ASCII.hs @@ -1,5 +1,8 @@ {-# LANGUAGE ScopedTypeVariables, CPP, ForeignFunctionInterface #-} {-# OPTIONS_HADDOCK hide #-} +#if __GLASGOW_HASKELL__ >= 701 +{-# LANGUAGE Trustworthy #-} +#endif -- | Copyright : (c) 2010 - 2011 Simon Meier -- License : BSD3-style (see LICENSE) -- diff --git a/Data/ByteString/Builder/Extra.hs b/Data/ByteString/Builder/Extra.hs index 1d935d4..d1ff83c 100644 --- a/Data/ByteString/Builder/Extra.hs +++ b/Data/ByteString/Builder/Extra.hs @@ -1,4 +1,7 @@ {-# LANGUAGE BangPatterns #-} +#if __GLASGOW_HASKELL__ >= 701 +{-# LANGUAGE Trustworthy #-} +#endif ----------------------------------------------------------------------------- -- | Copyright : (c) 2010 Jasper Van der Jeugt -- (c) 2010-2011 Simon Meier diff --git a/Data/ByteString/Builder/Internal.hs b/Data/ByteString/Builder/Internal.hs index 264ae38..b07355b 100644 --- a/Data/ByteString/Builder/Internal.hs +++ b/Data/ByteString/Builder/Internal.hs @@ -1,4 +1,7 @@ {-# LANGUAGE ScopedTypeVariables, CPP, BangPatterns, Rank2Types #-} +#if __GLASGOW_HASKELL__ >= 701 +{-# LANGUAGE Unsafe #-} +#endif {-# OPTIONS_HADDOCK hide #-} -- | Copyright : (c) 2010 - 2011 Simon Meier -- License : BSD3-style (see LICENSE) diff --git a/Data/ByteString/Builder/Prim.hs b/Data/ByteString/Builder/Prim.hs index c968959..5c8f633 100644 --- a/Data/ByteString/Builder/Prim.hs +++ b/Data/ByteString/Builder/Prim.hs @@ -1,5 +1,8 @@ {-# LANGUAGE CPP, BangPatterns, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} +#if __GLASGOW_HASKELL__ >= 701 +{-# LANGUAGE Trustworthy #-} +#endif {- | Copyright : (c) 2010-2011 Simon Meier (c) 2010 Jasper van der Jeugt License : BSD3-style (see LICENSE) diff --git a/Data/ByteString/Builder/Prim/Internal.hs b/Data/ByteString/Builder/Prim/Internal.hs index 5bd2236..607d380 100644 --- a/Data/ByteString/Builder/Prim/Internal.hs +++ b/Data/ByteString/Builder/Prim/Internal.hs @@ -1,4 +1,7 @@ {-# LANGUAGE ScopedTypeVariables, CPP, BangPatterns #-} +#if __GLASGOW_HASKELL__ >= 701 +{-# LANGUAGE Unsafe #-} +#endif {-# OPTIONS_HADDOCK hide #-} -- | -- Copyright : 2010-2011 Simon Meier, 2010 Jasper van der Jeugt diff --git a/Data/ByteString/Internal.hs b/Data/ByteString/Internal.hs index 883a879..28f6ad7 100644 --- a/Data/ByteString/Internal.hs +++ b/Data/ByteString/Internal.hs @@ -2,6 +2,9 @@ #if __GLASGOW_HASKELL__ {-# LANGUAGE UnliftedFFITypes, MagicHash, UnboxedTuples, DeriveDataTypeable #-} +#if __GLASGOW_HASKELL__ >= 701 +{-# LANGUAGE Unsafe #-} +#endif #endif {-# OPTIONS_HADDOCK hide #-} diff --git a/Data/ByteString/Lazy/Internal.hs b/Data/ByteString/Lazy/Internal.hs index 2888235..ade4968 100644 --- a/Data/ByteString/Lazy/Internal.hs +++ b/Data/ByteString/Lazy/Internal.hs @@ -1,6 +1,9 @@ {-# LANGUAGE CPP, ForeignFunctionInterface, BangPatterns #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable #-} +#if __GLASGOW_HASKELL__ >= 701 +{-# LANGUAGE Unsafe #-} +#endif #endif {-# OPTIONS_HADDOCK hide #-} _______________________________________________ ghc-commits mailing list ghc-commits@haskell.org http://www.haskell.org/mailman/listinfo/ghc-commits