Skip to content

Commit b4f7325

Browse files
committed
Depend on rio-prettyprint-0.1.7.0
1 parent 88b4c2f commit b4f7325

File tree

8 files changed

+37
-42
lines changed

8 files changed

+37
-42
lines changed

cabal.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ constraints:
152152
, retry ==0.9.3.1
153153
, rio ==0.1.22.0
154154
, rio-orphans ==0.1.2.0
155-
, rio-prettyprint ==0.1.5.0
155+
, rio-prettyprint ==0.1.7.0
156156
, rts ==1.0.2
157157
, safe ==0.3.19
158158
, safe-exceptions ==0.1.7.4

package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ dependencies:
111111
- project-template
112112
- random
113113
- rio >= 0.1.22.0
114-
- rio-prettyprint >= 0.1.5.0
114+
- rio-prettyprint >= 0.1.7.0
115115
- split
116116
- stm
117117
- tar

src/Stack/Prelude.hs

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,21 @@ import RIO as X
103103
import RIO.File as X hiding ( writeBinaryFileAtomic )
104104
import RIO.PrettyPrint
105105
( HasStylesUpdate (..), HasTerm (..), Pretty (..), Style (..)
106-
, StyleDoc, (<+>), align, bulletedList, debugBracket
107-
, displayWithColor, encloseSep, fill, fillSep, flow, hang
108-
, hcat, hsep, indent, line, logLevelToStyle, mkNarrativeList
106+
, StyleDoc, (<+>), align, blankLine, bulletedList
107+
, debugBracket, encloseSep, fill, fillSep, flow, hang, hcat
108+
, hsep, indent, line, logLevelToStyle, mkNarrativeList
109109
, parens, prettyDebug, prettyDebugL, prettyError
110-
, prettyErrorL, prettyInfo, prettyInfoL, prettyInfoS
111-
, prettyNote, prettyNoteL, prettyNoteS, prettyWarn
112-
, prettyWarnL, prettyWarnNoIndent, prettyWarnS, punctuate
113-
, sep, softbreak, softline, spacedBulletedList, string, style
114-
, stylesUpdateL, useColorL, vsep, spacedBulletedList
110+
, prettyErrorL, prettyGeneric, prettyInfo, prettyInfoL
111+
, prettyInfoS, prettyNote, prettyNoteL, prettyNoteS
112+
, prettyWarn, prettyWarnL, prettyWarnNoIndent, prettyWarnS
113+
, punctuate, sep, softbreak, softline, spacedBulletedList
114+
, string, style, stylesUpdateL, useColorL, vsep
115115
)
116116
import RIO.PrettyPrint.DefaultStyles (defaultStyles)
117-
import RIO.PrettyPrint.PrettyException ( PrettyException (..) )
117+
import RIO.PrettyPrint.PrettyException
118+
( PrettyException (..), ppException, prettyThrowIO
119+
, prettyThrowM
120+
)
118121
import RIO.PrettyPrint.StylesUpdate
119122
( StylesUpdate (..), parseStylesUpdateFromString )
120123
import RIO.PrettyPrint.Types ( StyleSpec )
@@ -344,32 +347,6 @@ bugDeclaration = "The impossible happened!"
344347
bugRequest :: String
345348
bugRequest = "Please report this bug at Stack's repository."
346349

347-
-- | A \'pretty\' blank line.
348-
blankLine :: StyleDoc
349-
blankLine = line <> line
350-
351-
-- | Provide the prettiest available information about an exception.
352-
ppException :: SomeException -> StyleDoc
353-
ppException e = case fromException e of
354-
Just (PrettyException e') -> pretty e'
355-
Nothing -> (string . displayException) e
356-
357-
-- | Synchronously throw the given exception as a 'PrettyException'.
358-
prettyThrowIO :: (Exception e, MonadIO m, Pretty e) => e -> m a
359-
prettyThrowIO = throwIO . PrettyException
360-
361-
-- | Throw the given exception as a 'PrettyException', when the action is run in
362-
-- the monad @m@.
363-
prettyThrowM :: (Exception e, MonadThrow m, Pretty e) => e -> m a
364-
prettyThrowM = throwM . PrettyException
365-
366350
-- | Maybe cons.
367351
mcons :: Maybe a -> [a] -> [a]
368352
mcons ma as = maybe as (:as) ma
369-
370-
prettyGeneric ::
371-
(HasTerm env, HasCallStack, Pretty b, MonadReader env m, MonadIO m)
372-
=> LogLevel
373-
-> b
374-
-> m ()
375-
prettyGeneric level = logGeneric "" level . display <=< displayWithColor

stack-ghc-9.6.2.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# GHC 9.6.2
55
resolver: nightly-2023-09-16
66

7+
extra-deps:
8+
- rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428
9+
710
docker:
811
enable: false
912
repo: glcr.b-data.ch/ghc/ghc-musl:9.6.2

stack-ghc-9.6.2.yaml.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
# For more information, please see the documentation at:
44
# https://docs.haskellstack.org/en/stable/lock_files
55

6-
packages: []
6+
packages:
7+
- completed:
8+
hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428
9+
pantry-tree:
10+
sha256: 5d18c4b8e4a0a959ab3e8544ea1baae1674ebbe01f379a2a75215c05f7d255ee
11+
size: 779
12+
original:
13+
hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428
714
snapshots:
815
- completed:
916
sha256: a25fd287afcd300f35a2019a03c990169f7507ae0f43dfec763062c9ad891193

stack.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ library
383383
, project-template
384384
, random
385385
, rio >=0.1.22.0
386-
, rio-prettyprint >=0.1.5.0
386+
, rio-prettyprint >=0.1.7.0
387387
, split
388388
, stm
389389
, tar
@@ -501,7 +501,7 @@ executable stack
501501
, project-template
502502
, random
503503
, rio >=0.1.22.0
504-
, rio-prettyprint >=0.1.5.0
504+
, rio-prettyprint >=0.1.7.0
505505
, split
506506
, stack
507507
, stm
@@ -600,7 +600,7 @@ executable stack-integration-test
600600
, project-template
601601
, random
602602
, rio >=0.1.22.0
603-
, rio-prettyprint >=0.1.5.0
603+
, rio-prettyprint >=0.1.7.0
604604
, split
605605
, stm
606606
, tar
@@ -713,7 +713,7 @@ test-suite stack-unit-test
713713
, random
714714
, raw-strings-qq
715715
, rio >=0.1.22.0
716-
, rio-prettyprint >=0.1.5.0
716+
, rio-prettyprint >=0.1.7.0
717717
, split
718718
, stack
719719
, stm

stack.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extra-deps:
2020
- optparse-applicative-0.18.1.0@sha256:b4cf8d9018e5e67cb1f14edb5130b6d05ad8bc1b5f6bd4efaa6ec0b7f28f559d,5132
2121
- optparse-generic-1.5.1@sha256:c65a7d3429feedf870f5a9f7f0d2aaf75609888b52449f85f22871b5f5a7e95f,2204
2222
- pantry-0.9.2@sha256:e1c5444d1b4003435d860853abd21e91e5fc337f2b2e2c8c992a2bac04712dc0,7650
23+
- rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428
2324
- static-bytes-0.1.0@sha256:35dbf30f617baa0151682c97687042516be07872a39984f9fe31f78125b962bf,1627
2425
- tar-conduit-0.4.0@sha256:f333649770f5ec42a83a93b0d424cf6bb895d80dfbee05a54340395f81d036ae,3126
2526
- tls-1.9.0@sha256:8ad332dc0224decb1b137bf6c9678b4f786487b9aaa5c9068cd3ad19d42c39a7,5571

stack.yaml.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ packages:
116116
size: 2665
117117
original:
118118
hackage: pantry-0.9.2@sha256:e1c5444d1b4003435d860853abd21e91e5fc337f2b2e2c8c992a2bac04712dc0,7650
119+
- completed:
120+
hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428
121+
pantry-tree:
122+
sha256: 5d18c4b8e4a0a959ab3e8544ea1baae1674ebbe01f379a2a75215c05f7d255ee
123+
size: 779
124+
original:
125+
hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428
119126
- completed:
120127
hackage: static-bytes-0.1.0@sha256:35dbf30f617baa0151682c97687042516be07872a39984f9fe31f78125b962bf,1627
121128
pantry-tree:

0 commit comments

Comments
 (0)