@@ -103,18 +103,21 @@ import RIO as X
103103import RIO.File as X hiding ( writeBinaryFileAtomic )
104104import 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 )
116116import RIO.PrettyPrint.DefaultStyles (defaultStyles )
117- import RIO.PrettyPrint.PrettyException ( PrettyException (.. ) )
117+ import RIO.PrettyPrint.PrettyException
118+ ( PrettyException (.. ), ppException , prettyThrowIO
119+ , prettyThrowM
120+ )
118121import RIO.PrettyPrint.StylesUpdate
119122 ( StylesUpdate (.. ), parseStylesUpdateFromString )
120123import RIO.PrettyPrint.Types ( StyleSpec )
@@ -344,32 +347,6 @@ bugDeclaration = "The impossible happened!"
344347bugRequest :: String
345348bugRequest = " 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.
367351mcons :: Maybe a -> [a ] -> [a ]
368352mcons 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
0 commit comments