Skip to content

Commit a3603ec

Browse files
pepeiborrasloorush
authored andcommitted
Restore compat. with prettyprinter 1.6 (haskell#2877)
1 parent b33d9da commit a3603ec

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

exe/Main.hs

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
-- Copyright (c) 2019 The DAML Authors. All rights reserved.
22
-- SPDX-License-Identifier: Apache-2.0
3+
{-# LANGUAGE CPP #-}
34
{-# LANGUAGE NamedFieldPuns #-}
45
{-# LANGUAGE OverloadedStrings #-}
56
module Main(main) where
@@ -23,7 +24,11 @@ import Ide.Types (PluginDescriptor (pluginNotificat
2324
import Language.LSP.Server as LSP
2425
import Language.LSP.Types as LSP
2526
import qualified Plugins
27+
#if MIN_VERSION_prettyprinter(1,7,0)
2628
import Prettyprinter (Pretty (pretty), vsep)
29+
#else
30+
import Data.Text.Prettyprint.Doc (Pretty (pretty), vsep)
31+
#endif
2732

2833
data Log
2934
= LogIdeMain IdeMain.Log

ghcide/ghcide.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cabal-version: 2.4
22
build-type: Simple
33
category: Development
44
name: ghcide
5-
version: 1.7.0.0
5+
version: 1.7.0.1
66
license: Apache-2.0
77
license-file: LICENSE
88
author: Digital Asset and Ghcide contributors
@@ -72,7 +72,7 @@ library
7272
optparse-applicative,
7373
parallel,
7474
prettyprinter-ansi-terminal,
75-
prettyprinter >= 1.7,
75+
prettyprinter >= 1.6,
7676
random,
7777
regex-tdfa >= 1.3.1.0,
7878
retrie,

ghcide/src/Development/IDE/Types/Logger.hs

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
-- Copyright (c) 2019 The DAML Authors. All rights reserved.
22
-- SPDX-License-Identifier: Apache-2.0
33

4+
{-# LANGUAGE CPP #-}
45
{-# LANGUAGE RankNTypes #-}
56
-- | This is a compatibility module that abstracts over the
67
-- concrete choice of logging framework so users can plug in whatever
@@ -54,8 +55,13 @@ import Language.LSP.Types (LogMessageParams (..),
5455
MessageType (..),
5556
SMethod (SWindowLogMessage, SWindowShowMessage),
5657
ShowMessageParams (..))
58+
#if MIN_VERSION_prettyprinter(1,7,0)
5759
import Prettyprinter as PrettyPrinterModule
5860
import Prettyprinter.Render.Text (renderStrict)
61+
#else
62+
import Data.Text.Prettyprint.Doc as PrettyPrinterModule
63+
import Data.Text.Prettyprint.Doc.Render.Text (renderStrict)
64+
#endif
5965
import System.IO (Handle, IOMode (AppendMode),
6066
hClose, hFlush, hSetEncoding,
6167
openFile, stderr, utf8)

stack-lts16.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ extra-deps:
6565
- monad-dijkstra-0.1.1.2
6666
- opentelemetry-0.6.1
6767
- opentelemetry-extra-0.6.1
68-
- prettyprinter-1.7.1
6968
- refinery-0.4.0.0
7069
- retrie-1.1.0.0
7170
- semigroups-0.18.5

0 commit comments

Comments
 (0)