From https://github.com/hledgerorg/hledger/commit/71a2fb42a4818abe18ac57d8e02e9b5b181a2958
From: Simon Michael <simon@joyful.com>
Date: Sat, 26 Sep 2026 04:35:37 -1000
Subject: [PATCH] pkg:ui: allow brick 3.0

hledger-ui can now be built with brick 3.0, as well as older brick versions.

brick 3.0 exports a char widget, which clashed with megaparsec's char
in ErrorScreen; use the equivalent single instead.
It also renamed translateBy to translateLayer; use the new name,
defining it for older brick with CPP.

AI usage: Claude Opus 5.5, ~9k output tokens
--- a/Hledger/UI/ErrorScreen.hs
+++ b/Hledger/UI/ErrorScreen.hs
@@ -120,7 +120,7 @@ esHandle ESS{..} ev = do
 -- Keep in sync with 'Hledger.Data.Transaction.showGenericSourcePos'
 hledgerparseerrorpositionp :: ParsecT Void String t (String, Int, Int)
 hledgerparseerrorpositionp = do
-  anySingle `manyTill` char '"'
+  anySingle `manyTill` single '"'
   f <- anySingle `manyTill` (oneOf ['"','\n'])
   choice [
       do
@@ -132,9 +132,9 @@ hledgerparseerrorpositionp = do
       do
           string " (lines "
           l <- read <$> some digitChar
-          char '-'
+          single '-'
           some digitChar
-          char ')'
+          single ')'
           return (f, l, 1)
       ]
