module Prettyprinter.Render.Util.Panic (
panicUncaughtFail,
panicUnpairedPop,
panicSimpleDocTreeConversionFailed,
panicInputNotFullyConsumed,
panicPeekedEmpty,
panicPoppedEmpty,
) where
panicUncaughtFail :: void
panicUncaughtFail :: void
panicUncaughtFail = [Char] -> void
forall a. HasCallStack => [Char] -> a
error ([Char]
"»SFail« must not appear in a rendered »SimpleDocStream«. This is a bug in the layout algorithm! " [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
report)
panicUnpairedPop :: void
panicUnpairedPop :: void
panicUnpairedPop = [Char] -> void
forall a. HasCallStack => [Char] -> a
error ([Char]
"An unpaired style terminator was encountered. This is a bug in the layout algorithm! " [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
report)
panicSimpleDocTreeConversionFailed :: void
panicSimpleDocTreeConversionFailed :: void
panicSimpleDocTreeConversionFailed = [Char] -> void
forall a. HasCallStack => [Char] -> a
error ([Char]
"Conversion from SimpleDocStream to SimpleDocTree failed! " [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
report)
panicInputNotFullyConsumed :: void
panicInputNotFullyConsumed :: void
panicInputNotFullyConsumed = [Char] -> void
forall a. HasCallStack => [Char] -> a
error ([Char]
"Conversion from SimpleDocStream to SimpleDocTree left unconsumed input! " [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
report)
report :: String
report :: [Char]
report = [Char]
"Please report this as a bug"
panicPeekedEmpty, panicPoppedEmpty :: void
(void
panicPeekedEmpty, void
panicPoppedEmpty) = ([Char] -> void
forall a. [Char] -> a
mkErr [Char]
"Peeked", [Char] -> void
forall a. [Char] -> a
mkErr [Char]
"Popped")
where
mkErr :: [Char] -> a
mkErr [Char]
x = [Char] -> a
forall a. HasCallStack => [Char] -> a
error ([Char]
x [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
" an empty style stack! Please report this as a bug.")