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
9 changes: 3 additions & 6 deletions pretty.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ Library
Text.PrettyPrint.Annotated.HughesPJ
Text.PrettyPrint.Annotated.HughesPJClass

build-depends: base >= 4.5 && < 5,
build-depends: base >= 4.6 && < 5,
deepseq >= 1.1
if impl(ghc)
build-depends: ghc-prim

default-language: Haskell98
default-extensions: CPP, BangPatterns, DeriveGeneric
Expand All @@ -81,9 +79,8 @@ Test-Suite test-pretty
UnitT3911
UnitT32

build-depends: base >= 4.5 && < 5,
build-depends: base >= 4.6 && < 5,
deepseq >= 1.1,
ghc-prim,
QuickCheck >= 2.5 && <3

default-language: Haskell98
Expand All @@ -95,7 +92,7 @@ benchmark pretty-bench
main-is: Bench.hs
hs-source-dirs: bench

build-depends: base >= 4.5 && < 5
build-depends: base >= 4.6 && < 5
, criterion
, pretty

Expand Down
8 changes: 0 additions & 8 deletions src/Text/PrettyPrint/Annotated/HughesPJ.hs
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,7 @@ data Doc a
| NoDoc -- ^ The empty set of documents.
| Beside (Doc a) Bool (Doc a) -- ^ True <=> space between.
| Above (Doc a) Bool (Doc a) -- ^ True <=> never overlap.
#if __GLASGOW_HASKELL__ >= 701
deriving (Generic)
#endif

{-
Here are the invariants:
Expand Down Expand Up @@ -261,9 +259,7 @@ data TextDetails = Chr {-# UNPACK #-} !Char -- ^ A single Char fragment
| PStr String -- ^ Used to represent a Fast String fragment
-- but now deprecated and identical to the
-- Str constructor.
#if __GLASGOW_HASKELL__ >= 701 || __MHS__
deriving (Show, Eq, Generic)
#endif

-- Combining @Doc@ values
#if __GLASGOW_HASKELL__ >= 800 || __MHS__
Expand Down Expand Up @@ -931,9 +927,7 @@ data Style
-- 50 characters of ribbon to be displayed on a line, while
-- allowing it to be indented up to 50 characters.
}
#if __GLASGOW_HASKELL__ >= 701
deriving (Show, Eq, Generic)
#endif

-- | The default style (@mode=PageMode, lineLength=100, ribbonsPerLine=1.5@).
style :: Style
Expand All @@ -952,9 +946,7 @@ data Mode = PageMode
| OneLineMode
-- ^ All on one line, 'lineLength' ignored and explicit new lines
-- (@$$@) are turned into spaces.
#if __GLASGOW_HASKELL__ >= 701 || __MHS__
deriving (Show, Eq, Generic)
#endif

-- | Render the @Doc@ to a String using the default @Style@ (see 'style').
render :: Doc a -> String
Expand Down
2 changes: 0 additions & 2 deletions src/Text/PrettyPrint/HughesPJ.hs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ infixl 5 $$, $+$
-- | The abstract type of documents. A Doc represents a /set/ of layouts. A
-- Doc with no occurrences of Union or NoDoc represents just one layout.
newtype Doc = Doc (Ann.Doc ())
#if __GLASGOW_HASKELL__ >= 701
deriving (Generic)
#endif

liftList :: ([Ann.Doc ()] -> Ann.Doc ()) -> ([Doc] -> Doc)
liftList f ds = Doc (f [ d | Doc d <- ds ])
Expand Down