From 0d1c53f84597bad312ea8b4d2893a1ddfbbd7d19 Mon Sep 17 00:00:00 2001 From: "Trevor L. McDonell" Date: Fri, 18 Feb 2022 17:22:33 +0100 Subject: [PATCH] warning police --- accelerate.cabal | 2 +- src/Data/Array/Accelerate/Pretty.hs | 6 +++--- src/Data/Array/Accelerate/Pretty/Graphviz.hs | 2 +- src/Data/Array/Accelerate/Pretty/Graphviz/Type.hs | 2 +- src/Data/Array/Accelerate/Pretty/Print.hs | 4 ++-- src/Data/Array/Accelerate/Trafo/Algebra.hs | 7 ++++--- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/accelerate.cabal b/accelerate.cabal index 098d7b9a9..1b6cab0bd 100644 --- a/accelerate.cabal +++ b/accelerate.cabal @@ -346,7 +346,7 @@ library , hedgehog >= 0.5 , microlens >= 0.4 , mtl >= 2.0 - , prettyprinter >= 1.6.1 + , prettyprinter >= 1.7 , prettyprinter-ansi-terminal >= 1.0 , primitive >= 0.6.4 , tasty >= 0.11 diff --git a/src/Data/Array/Accelerate/Pretty.hs b/src/Data/Array/Accelerate/Pretty.hs index 38fb567a1..9aa5848e8 100644 --- a/src/Data/Array/Accelerate/Pretty.hs +++ b/src/Data/Array/Accelerate/Pretty.hs @@ -46,9 +46,9 @@ import Data.Array.Accelerate.Trafo import Data.Array.Accelerate.Trafo.Delayed import Data.Maybe -import Data.Text.Prettyprint.Doc -import Data.Text.Prettyprint.Doc.Render.String -import Data.Text.Prettyprint.Doc.Render.Terminal +import Prettyprinter +import Prettyprinter.Render.String +import Prettyprinter.Render.Terminal import System.Environment import System.IO import System.IO.Unsafe diff --git a/src/Data/Array/Accelerate/Pretty/Graphviz.hs b/src/Data/Array/Accelerate/Pretty/Graphviz.hs index e95e657d1..ca63fd323 100644 --- a/src/Data/Array/Accelerate/Pretty/Graphviz.hs +++ b/src/Data/Array/Accelerate/Pretty/Graphviz.hs @@ -51,7 +51,7 @@ import Data.HashSet ( HashSet ) import Data.List ( nub, partition ) import Data.Maybe import Data.String -import Data.Text.Prettyprint.Doc +import Prettyprinter import Prelude hiding ( exp ) import qualified Data.HashSet as Set import qualified Data.Sequence as Seq diff --git a/src/Data/Array/Accelerate/Pretty/Graphviz/Type.hs b/src/Data/Array/Accelerate/Pretty/Graphviz/Type.hs index 79a16c6c8..495ff311e 100644 --- a/src/Data/Array/Accelerate/Pretty/Graphviz/Type.hs +++ b/src/Data/Array/Accelerate/Pretty/Graphviz/Type.hs @@ -19,7 +19,7 @@ module Data.Array.Accelerate.Pretty.Graphviz.Type import Data.Hashable import Data.Maybe import Data.Text ( Text ) -import Data.Text.Prettyprint.Doc +import Prettyprinter import Text.Printf import qualified Data.Text as Text diff --git a/src/Data/Array/Accelerate/Pretty/Print.hs b/src/Data/Array/Accelerate/Pretty/Print.hs index bb8ebbe9e..965aecd99 100644 --- a/src/Data/Array/Accelerate/Pretty/Print.hs +++ b/src/Data/Array/Accelerate/Pretty/Print.hs @@ -72,8 +72,8 @@ import qualified Data.Array.Accelerate.Trafo.Delayed as Delayed import Data.Char import Data.String -import Data.Text.Prettyprint.Doc -import Data.Text.Prettyprint.Doc.Render.Terminal +import Prettyprinter +import Prettyprinter.Render.Terminal import Prelude hiding ( exp ) diff --git a/src/Data/Array/Accelerate/Trafo/Algebra.hs b/src/Data/Array/Accelerate/Trafo/Algebra.hs index 9cfea36ae..4c0fbd397 100644 --- a/src/Data/Array/Accelerate/Trafo/Algebra.hs +++ b/src/Data/Array/Accelerate/Trafo/Algebra.hs @@ -39,12 +39,13 @@ import qualified Data.Array.Accelerate.Debug.Internal.Stats as Stats import Data.Bits import Data.Monoid import Data.Text ( Text ) -import Data.Text.Prettyprint.Doc -import Data.Text.Prettyprint.Doc.Render.Text -import GHC.Float ( float2Double, double2Float ) +import Prettyprinter +import Prettyprinter.Render.Text import Prelude hiding ( exp ) import qualified Prelude as P +import GHC.Float ( float2Double, double2Float ) + -- Propagate constant expressions, which are either constant valued expressions -- or constant let bindings. Be careful not to follow self-cycles.