Permalink
Browse files

Get rid of 'MonoPatBinds deprecated' warnings.

  • Loading branch information...
1 parent 5e07b2c commit 0dde6e187c420623b368ea35fc38962ce2b71609 @meiersi committed Mar 11, 2013
@@ -1,4 +1,8 @@
-{-# LANGUAGE CPP, BangPatterns, OverloadedStrings, MonoPatBinds #-}
+{-# LANGUAGE CPP, BangPatterns, OverloadedStrings #-}
+
+#ifdef USE_MONO_PAT_BINDS
+{-# LANGUAGE MonoPatBinds #-}
+#endif
-- |
-- Module : Blaze.ByteString.Builder.ByteString
@@ -1,6 +1,11 @@
+-- ignore warning from 'import Data.Text.Encoding'
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+{-# LANGUAGE CPP #-}
+
+#ifdef USE_MONO_PAT_BINDS
{-# LANGUAGE MonoPatBinds #-}
--- ignore warning from 'import Data.Text.Encoding'
+#endif
-- |
-- Module : Blaze.ByteString.Builder.Char8
@@ -1,4 +1,9 @@
-{-# LANGUAGE BangPatterns, CPP, MagicHash, OverloadedStrings, MonoPatBinds #-}
+{-# LANGUAGE BangPatterns, CPP, MagicHash, OverloadedStrings #-}
+
+#ifdef USE_MONO_PAT_BINDS
+{-# LANGUAGE MonoPatBinds #-}
+#endif
+
-- | Support for HTTP response encoding.
--
-- TODO: Improve documentation.
@@ -1,4 +1,9 @@
+{-# LANGUAGE CPP #-}
+
+#ifdef USE_MONO_PAT_BINDS
{-# LANGUAGE MonoPatBinds #-}
+#endif
+
-- |
-- Module : Blaze.ByteString.Builder.Int
-- Copyright : (c) 2010 Simon Meier
@@ -1,4 +1,9 @@
-{-# LANGUAGE CPP, BangPatterns, Rank2Types, MonoPatBinds #-}
+{-# LANGUAGE CPP, BangPatterns, Rank2Types #-}
+
+#ifdef USE_MONO_PAT_BINDS
+{-# LANGUAGE MonoPatBinds #-}
+#endif
+
-- |
-- Module : Blaze.ByteString.Builder.Internal
-- Copyright : (c) 2010 Simon Meier
@@ -1,4 +1,9 @@
-{-# LANGUAGE CPP, BangPatterns, Rank2Types, MonoPatBinds #-}
+{-# LANGUAGE CPP, BangPatterns, Rank2Types #-}
+
+#ifdef USE_MONO_PAT_BINDS
+{-# LANGUAGE MonoPatBinds #-}
+#endif
+
-- |
-- Module : Blaze.ByteString.Builder.Internal.Buffer
-- Copyright : (c) 2010 Simon Meier
@@ -1,4 +1,9 @@
-{-# LANGUAGE CPP, BangPatterns, Rank2Types, MonoPatBinds #-}
+{-# LANGUAGE CPP, BangPatterns, Rank2Types #-}
+
+#ifdef USE_MONO_PAT_BINDS
+{-# LANGUAGE MonoPatBinds #-}
+#endif
+
-- |
-- Module : Blaze.ByteString.Builder.Internal.Types
-- Copyright : (c) 2010 Simon Meier
@@ -1,4 +1,9 @@
-{-# LANGUAGE CPP, MagicHash, MonoPatBinds #-}
+{-# LANGUAGE CPP, MagicHash #-}
+
+#ifdef USE_MONO_PAT_BINDS
+{-# LANGUAGE MonoPatBinds #-}
+#endif
+
-- |
-- Module : Blaze.ByteString.Builder.Internal.UncheckedShifts
-- Copyright : (c) 2010 Simon Meier
@@ -1,4 +1,8 @@
-{-# LANGUAGE CPP, BangPatterns, MonoPatBinds #-}
+{-# LANGUAGE CPP, BangPatterns #-}
+
+#ifdef USE_MONO_PAT_BINDS
+{-# LANGUAGE MonoPatBinds #-}
+#endif
-- |
-- Module : Blaze.ByteString.Builder.Internal.Poke
-- Copyright : (c) 2010 Simon Meier
@@ -1,4 +1,9 @@
-{-# LANGUAGE CPP, MonoPatBinds #-}
+{-# LANGUAGE CPP #-}
+
+#ifdef USE_MONO_PAT_BINDS
+{-# LANGUAGE MonoPatBinds #-}
+#endif
+
-- |
-- Module : Blaze.ByteString.Builder.Word
-- Copyright : (c) 2010 Jasper Van der Jeugt & Simon Meier
View
@@ -53,6 +53,9 @@ Library
if impl(ghc >= 7.4)
cpp-options: -DHAS_FOREIGN_UNSAFE_MODULE
+ -- GHC 7.0.x and lower required MonoPatBinds feature
+ if impl(ghc < 7.2)
+ cpp-options: -DUSE_MONO_PAT_BINDS
exposed-modules: Blaze.ByteString.Builder
Blaze.ByteString.Builder.Int

0 comments on commit 0dde6e1

Please sign in to comment.