module Prettyprinter.Render.Util.Panic (
panicUncaughtFail,
panicUnpairedPop,
panicSimpleDocTreeConversionFailed,
panicInputNotFullyConsumed,
panicPeekedEmpty,
panicPoppedEmpty,
) where
panicUncaughtFail :: void
panicUncaughtFail :: forall void. 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 :: forall void. 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 :: forall void. 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 :: forall void. 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.")