Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions prettyprinter-ansi-terminal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

- Drop support for GHC 7.

# [1.1.3]

- [Deprecate the `Data.Text.Prettyprint.*` modules](https://github.com/quchen/prettyprinter/pull/203)
Expand Down
8 changes: 4 additions & 4 deletions prettyprinter-ansi-terminal/prettyprinter-ansi-terminal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ library


build-depends:
base >= 4.5 && < 5
base >= 4.9 && < 5
, ansi-terminal >= 0.4.0
, text >= 1.2
, prettyprinter >= 1.7.0
Expand All @@ -50,7 +50,7 @@ test-suite doctest
hs-source-dirs: test/Doctest
main-is: Main.hs
build-depends:
base >= 4.7 && < 5
base >= 4.9 && < 5
, doctest >= 0.9
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
Expand All @@ -60,8 +60,8 @@ test-suite doctest

benchmark large-output
build-depends:
base >= 4.5 && < 5
, base-compat >=0.9.3 && <0.12
base >= 4.9 && < 5
, base-compat >=0.9.3 && <0.15
, containers
, deepseq
, tasty-bench >= 0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ library
other-extensions: CPP

build-depends:
base >= 4.5 && < 5
base >= 4.9 && < 5
, text >= 1.2
, prettyprinter >= 1.7
4 changes: 4 additions & 0 deletions prettyprinter-compat-ansi-wl-pprint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

- Drop support for GHC 7.

# [1.1]

- [Change `renderPretty` to use `layoutPretty` instead of `layoutSmart`.](https://github.com/quchen/prettyprinter/pull/244)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ library
, OverloadedStrings

build-depends:
base >= 4.5 && < 5
base >= 4.9 && < 5
, text >= 1.2
, prettyprinter >= 1.7.0
, prettyprinter-ansi-terminal >= 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ library
, OverloadedStrings

build-depends:
base >= 4.5 && < 5
base >= 4.9 && < 5
, text >= 1.2
, prettyprinter >= 1.7.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ library
, OverloadedStrings

build-depends:
base >= 4.5 && < 5
base >= 4.9 && < 5
, text >= 1.2
, prettyprinter >= 1.7.0
, prettyprinter-ansi-terminal >= 1.1.1
Expand All @@ -41,7 +41,7 @@ test-suite doctest
hs-source-dirs: test/Doctest
main-is: Main.hs
build-depends:
base >= 4.7 && < 5
base >= 4.9 && < 5
, doctest >= 0.9
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
Expand Down
4 changes: 4 additions & 0 deletions prettyprinter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

- Drop support for GHC 7.

# [1.7.1]

- [Deprecate the `Data.Text.Prettyprint.*` modules](https://github.com/quchen/prettyprinter/pull/203)
Expand Down
14 changes: 7 additions & 7 deletions prettyprinter/prettyprinter.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ library
, ScopedTypeVariables

build-depends:
base >= 4.5 && < 5
base >= 4.9 && < 5

if flag(text)
build-depends: text >= 1.2
Expand Down Expand Up @@ -112,7 +112,7 @@ executable generate_readme
hs-source-dirs: app
main-is: GenerateReadme.hs
build-depends:
base >= 4.7 && < 5
base >= 4.9 && < 5
, prettyprinter

, text
Expand All @@ -134,7 +134,7 @@ test-suite doctest
hs-source-dirs: test/Doctest
main-is: Main.hs
build-depends:
base >= 4.7 && < 5
base >= 4.9 && < 5
, doctest >= 0.9
, prettyprinter
, QuickCheck >= 2.5
Expand Down Expand Up @@ -175,7 +175,7 @@ benchmark fusion
hs-source-dirs: bench
main-is: Fusion.hs
build-depends:
base >= 4.5 && < 5
base >= 4.9 && < 5
, prettyprinter

, tasty-bench >= 0.2
Expand All @@ -192,7 +192,7 @@ benchmark fusion

benchmark faster-unsafe-text
build-depends:
base >= 4.5 && < 5
base >= 4.9 && < 5
, prettyprinter

, tasty-bench >= 0.2
Expand All @@ -209,8 +209,8 @@ benchmark faster-unsafe-text

benchmark large-output
build-depends:
base >= 4.5 && < 5
, base-compat >=0.9.3 && <0.12
base >= 4.9 && < 5
, base-compat >=0.9.3 && <0.15
, prettyprinter
, ansi-wl-pprint

Expand Down
16 changes: 5 additions & 11 deletions prettyprinter/src/Prettyprinter/Internal.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
Expand Down Expand Up @@ -94,7 +93,6 @@ import Data.String (IsString (..))
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Lazy as Lazy
import Data.Typeable (Typeable)
import Data.Void
import Data.Word
import GHC.Generics (Generic)
Expand Down Expand Up @@ -195,7 +193,7 @@ data Doc ann =
-- | Add an annotation to the enclosed 'Doc'. Can be used for example to add
-- styling directives or alt texts that can then be used by the renderer.
| Annotated ann (Doc ann)
deriving (Generic, Typeable)
deriving Generic

-- |
-- @
Expand Down Expand Up @@ -1530,7 +1528,6 @@ reAnnotateS re = go
SAnnPush ann rest -> SAnnPush (re ann) (go rest)

data AnnotationRemoval = Remove | DontRemove
deriving Typeable

-- | Change the annotation of a document to a different annotation, or none at
-- all. 'alterAnnotations' for 'SimpleDocStream'.
Expand Down Expand Up @@ -1575,7 +1572,7 @@ data FusionDepth =
-- This value should only be used if profiling shows it is significantly
-- faster than using 'Shallow'.
| Deep
deriving (Eq, Ord, Show, Typeable)
deriving (Eq, Ord, Show)

-- | @('fuse' depth doc)@ combines text nodes so they can be rendered more
-- efficiently. A fused document is always laid out identical to its unfused
Expand Down Expand Up @@ -1676,7 +1673,7 @@ data SimpleDocStream ann =

-- | Remove a previously pushed annotation.
| SAnnPop (SimpleDocStream ann)
deriving (Eq, Ord, Show, Generic, Typeable)
deriving (Eq, Ord, Show, Generic)

-- | Remove all trailing space characters.
--
Expand Down Expand Up @@ -1762,7 +1759,6 @@ data WhitespaceStrippingState
= AnnotationLevel !Int
| RecordedWhitespace [Int] !Int
-- ^ [Newline with indentation i] Spaces
deriving Typeable



Expand Down Expand Up @@ -1826,14 +1822,12 @@ newtype FittingPredicate ann
-> Maybe Int
-> SimpleDocStream ann
-> Bool)
deriving Typeable

-- | List of nesting level/document pairs yet to be laid out.
data LayoutPipeline ann =
Nil
| Cons !Int (Doc ann) (LayoutPipeline ann)
| UndoAnn (LayoutPipeline ann)
deriving Typeable

-- | Maximum number of characters that fit in one line. The layout algorithms
-- will try not to exceed the set limit by inserting line breaks when applicable
Expand All @@ -1854,7 +1848,7 @@ data PageWidth
| Unbounded
-- ^ Layouters should not introduce line breaks on their own.

deriving (Eq, Ord, Show, Typeable)
deriving (Eq, Ord, Show)

defaultPageWidth :: PageWidth
defaultPageWidth = AvailablePerLine 80 1
Expand All @@ -1876,7 +1870,7 @@ remainingWidth lineLength ribbonFraction lineIndent currentColumn =

-- | Options to influence the layout algorithms.
newtype LayoutOptions = LayoutOptions { layoutPageWidth :: PageWidth }
deriving (Eq, Ord, Show, Typeable)
deriving (Eq, Ord, Show)

-- | The default layout options, suitable when you just want some output, and
-- don’t particularly care about the details. Used by the 'Show' instance, for
Expand Down
7 changes: 2 additions & 5 deletions prettyprinter/src/Prettyprinter/Render/Util/SimpleDocTree.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}

#include "version-compatibility-macros.h"
Expand Down Expand Up @@ -27,7 +26,6 @@ module Prettyprinter.Render.Util.SimpleDocTree (
import Control.Applicative
import Data.Text (Text)
import qualified Data.Text as T
import Data.Typeable (Typeable)
import GHC.Generics

import Prettyprinter
Expand Down Expand Up @@ -104,7 +102,6 @@ renderSimplyDecoratedA text renderAnn = go
--
-- Hand-written to avoid a dependency on a parser lib.
newtype UniqueParser s a = UniqueParser { runParser :: s -> Maybe (a, s) }
deriving Typeable

instance Functor (UniqueParser s) where
fmap f (UniqueParser mx) = UniqueParser (\s ->
Expand Down Expand Up @@ -144,7 +141,7 @@ data SimpleDocTok ann
| TokLine Int
| TokAnnPush ann
| TokAnnPop
deriving (Eq, Ord, Show, Typeable)
deriving (Eq, Ord, Show)

-- | A 'SimpleDocStream' is a linked list of different annotated cons cells
-- ('SText' and then some further 'SimpleDocStream', 'SLine' and then some
Expand All @@ -168,7 +165,7 @@ data SimpleDocTree ann

-- | Horizontal concatenation of multiple documents.
| STConcat [SimpleDocTree ann]
deriving (Eq, Ord, Show, Generic, Typeable)
deriving (Eq, Ord, Show, Generic)

-- | Alter the document’s annotations.
--
Expand Down
Loading