From 63e795f512909ecc574ccf8ead2f223b6ce2b3af Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Mon, 23 Oct 2023 11:48:28 +0100 Subject: [PATCH] Use with-utf8 to manage setting a compatible terminal locale See: https://serokell.io/blog/haskell-with-utf8 for motivation for this library. --- app/Main.hs | 3 ++- package.yaml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Main.hs b/app/Main.hs index a89240da18..ec8e4ea3c5 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -7,11 +7,12 @@ import CommonOptions import Data.String.Interpolate (i) import GlobalOptions import Juvix.Compiler.Pipeline.Root +import Main.Utf8 (withUtf8) import TopCommand import TopCommand.Options main :: IO () -main = do +main = withUtf8 $ do let parserPreferences = prefs showHelpOnEmpty invokeDir <- getCurrentDir (_runAppIOArgsGlobalOptions, cli) <- customExecParser parserPreferences descr diff --git a/package.yaml b/package.yaml index 11fe92b185..3181f80054 100644 --- a/package.yaml +++ b/package.yaml @@ -88,6 +88,7 @@ dependencies: - unordered-containers == 0.2.* - utf8-string == 1.0.* - versions == 6.0.* + - with-utf8 == 1.0.* - xdg-basedir == 0.2.* - yaml == 0.11.*