From aad6ec92bb21bd2cbc32857bfee3fa99bb3224a6 Mon Sep 17 00:00:00 2001 From: Rhys Date: Fri, 31 Jul 2015 11:48:31 +1000 Subject: [PATCH] Mark Conduit modules as Safe/Trustworthy Unfortunately RULES pragmas can't be defined (more accurately, won't fire if defined) in Safe modules, so Trustworthy is the only option in many cases. --- conduit/Data/Conduit.hs | 1 + conduit/Data/Conduit/Internal.hs | 1 + conduit/Data/Conduit/Internal/Conduit.hs | 4 ++-- conduit/Data/Conduit/Internal/Fusion.hs | 1 + conduit/Data/Conduit/Internal/List/Stream.hs | 1 + conduit/Data/Conduit/Internal/Pipe.hs | 2 +- conduit/Data/Conduit/Lift.hs | 1 + conduit/Data/Conduit/List.hs | 1 + 8 files changed, 9 insertions(+), 3 deletions(-) diff --git a/conduit/Data/Conduit.hs b/conduit/Data/Conduit.hs index 33a44a671..fe7942e0e 100644 --- a/conduit/Data/Conduit.hs +++ b/conduit/Data/Conduit.hs @@ -1,5 +1,6 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE Safe #-} -- | If this is your first time with conduit, you should probably start with -- the tutorial: -- . diff --git a/conduit/Data/Conduit/Internal.hs b/conduit/Data/Conduit/Internal.hs index 73da709ed..002ef44ed 100644 --- a/conduit/Data/Conduit/Internal.hs +++ b/conduit/Data/Conduit/Internal.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Safe #-} {-# OPTIONS_HADDOCK not-home #-} module Data.Conduit.Internal ( -- * Pipe diff --git a/conduit/Data/Conduit/Internal/Conduit.hs b/conduit/Data/Conduit/Internal/Conduit.hs index 6857948a3..672cfe287 100644 --- a/conduit/Data/Conduit/Internal/Conduit.hs +++ b/conduit/Data/Conduit/Internal/Conduit.hs @@ -1,4 +1,5 @@ {-# OPTIONS_HADDOCK not-home #-} +{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE CPP #-} @@ -6,8 +7,7 @@ {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE ImpredicativeTypes #-} +{-# LANGUAGE Trustworthy #-} module Data.Conduit.Internal.Conduit ( -- ** Types ConduitM (..) diff --git a/conduit/Data/Conduit/Internal/Fusion.hs b/conduit/Data/Conduit/Internal/Fusion.hs index 582d485fa..cd2b34402 100644 --- a/conduit/Data/Conduit/Internal/Fusion.hs +++ b/conduit/Data/Conduit/Internal/Fusion.hs @@ -2,6 +2,7 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE Trustworthy #-} module Data.Conduit.Internal.Fusion ( -- ** Types Step (..) diff --git a/conduit/Data/Conduit/Internal/List/Stream.hs b/conduit/Data/Conduit/Internal/List/Stream.hs index e5ac7e817..ff01ee292 100644 --- a/conduit/Data/Conduit/Internal/List/Stream.hs +++ b/conduit/Data/Conduit/Internal/List/Stream.hs @@ -1,6 +1,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE RankNTypes #-} +{-# LANGUAGE Trustworthy #-} module Data.Conduit.Internal.List.Stream where import Control.Monad (liftM) diff --git a/conduit/Data/Conduit/Internal/Pipe.hs b/conduit/Data/Conduit/Internal/Pipe.hs index 1de1b6592..aa8a10a84 100644 --- a/conduit/Data/Conduit/Internal/Pipe.hs +++ b/conduit/Data/Conduit/Internal/Pipe.hs @@ -6,8 +6,8 @@ {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImpredicativeTypes #-} +{-# LANGUAGE Trustworthy #-} module Data.Conduit.Internal.Pipe ( -- ** Types Pipe (..) diff --git a/conduit/Data/Conduit/Lift.hs b/conduit/Data/Conduit/Lift.hs index 54dc0b00c..c2553cee9 100644 --- a/conduit/Data/Conduit/Lift.hs +++ b/conduit/Data/Conduit/Lift.hs @@ -1,4 +1,5 @@ {-# LANGUAGE RankNTypes #-} +{-# LANGUAGE Safe #-} -- | Allow monad transformers to be run\/eval\/exec in a section of conduit -- rather then needing to run across the whole conduit. The circumvents many -- of the problems with breaking the monad transformer laws. For more diff --git a/conduit/Data/Conduit/List.hs b/conduit/Data/Conduit/List.hs index 931296b9f..a389adac6 100644 --- a/conduit/Data/Conduit/List.hs +++ b/conduit/Data/Conduit/List.hs @@ -1,6 +1,7 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} +{-# LANGUAGE Trustworthy #-} -- | Higher-level functions to interact with the elements of a stream. Most of -- these are based on list functions. --