$NetBSD: patch-app_Main.lhs,v 1.1 2025/01/31 07:36:48 pho Exp $ Workaround for happy chokes on non-ASCII inputs when the locale isn't "*.UTF-8". This is probably not a desirable way to fix it but a proper fix would need a serious work. Without this workaround we cannot build devel/hs-ghc-lib-parser. TODO: Report this to upstream and let them decide what to do. --- app/Main.lhs.orig 2025-01-31 01:25:49.829104023 +0000 +++ app/Main.lhs @@ -28,12 +28,14 @@ Path settings auto-generated by Cabal: > import System.Environment > import System.Exit (exitWith, ExitCode(..)) > import Data.Char +> import GHC.IO.Encoding (setLocaleEncoding) > import System.IO > import Data.List( isSuffixOf ) > import Data.Version ( showVersion ) > main :: IO () > main = do +> setLocaleEncoding utf8 Read and parse the CLI arguments.