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
16 changes: 7 additions & 9 deletions src/Text/PrettyPrint/GenericPretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@ import qualified Data.Map.Strict
import Data.String.Conversions (cs)
import qualified Data.Text as T
import qualified Data.ByteString.Lazy as BSL
import Data.Text.Lazy (Text, fromStrict)
import Data.Text.Lazy (Text)
import Data.Time
import GHC.Generics
import Protolude hiding (Text, bool,
(<$>), (<>))
import Text.PrettyPrint.Leijen.Text hiding (Pretty (..),
(<>))
(<$>))
import Text.PrettyPrint.Leijen.Text hiding (Pretty (..))
import qualified Text.PrettyPrint.Leijen.Text as PP

-- | The class 'Pretty' is the equivalent of 'Prelude.Show'
Expand All @@ -61,11 +60,10 @@ class Pretty a where
(o:[]) -> o
os -> PP.list os

--'GPretty' is a helper class used to output the Sum-of-Products type, since it has kind *->*,
-- | 'GPretty' is a helper class used to output the Sum-of-Products type, since it has kind *->*,
-- so can't be an instance of 'Pretty'
class GPretty f
-- |'gpretty' is the (*->*) kind equivalent of 'docPrec'
where
class GPretty f where
-- |'gpretty' is the (*->*) kind equivalent of 'docPrec'
gpretty :: f x -> [Doc]

-- if empty, output nothing, this is a null constructor
Expand Down Expand Up @@ -324,7 +322,7 @@ displayPrettyPrefixL
:: (Pretty a, Pretty b)
=> a -> b -> Text
displayPrettyPrefixL prefix =
PP.displayT . PP.renderPretty 1.0 70 . (PP.<>) (pretty prefix) . pretty
PP.displayT . PP.renderPretty 1.0 70 . (pretty prefix <>) . pretty

displayPrettyPrefix
:: (Pretty a, Pretty b)
Expand Down
3 changes: 2 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ extra-package-dbs: []
packages:
- '.'
extra-deps:
resolver: nightly-2016-11-30
- ixset-typed-0.5
resolver: lts-15.13
pvp-bounds: both