diff --git a/main/Main.hs b/main/Main.hs index 4ec2244..88406b3 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -139,7 +139,7 @@ main = do | finder opts = fromValue @(AttrSet (NThunk m)) >=> findAttrs | xml opts = - liftIO . putStrLn . toXML <=< normalForm + liftIO . Text.putStrLn . hackyStringIgnoreContext .toXML <=< normalForm | json opts = liftIO . TL.putStrLn . TL.decodeUtf8 diff --git a/main/Repl.hs b/main/Repl.hs index 7847bb5..30b3532 100644 --- a/main/Repl.hs +++ b/main/Repl.hs @@ -54,7 +54,7 @@ import System.Exit main :: (MonadNix e m, MonadIO m, MonadException m) => m () main = flip evalStateT initState $ #if MIN_VERSION_repline(0, 2, 0) - evalRepl (return prefix) cmd options (Just ':') completer init + evalRepl (return prefix) cmd options (Just ':') completer welcomeText #else evalRepl prefix cmd options completer welcomeText #endif diff --git a/tests/NixLanguageTests.hs b/tests/NixLanguageTests.hs index 8fa7827..dcc4dbf 100644 --- a/tests/NixLanguageTests.hs +++ b/tests/NixLanguageTests.hs @@ -22,6 +22,7 @@ import Nix.Options import Nix.Options.Parser import Nix.Parser import Nix.Pretty +import Nix.String import Nix.Utils import Nix.XML import qualified Options.Applicative as Opts @@ -110,7 +111,7 @@ assertLangOkXml :: Options -> FilePath -> Assertion assertLangOkXml opts file = do actual <- toXML <$> hnixEvalFile opts (file ++ ".nix") expected <- Text.readFile $ file ++ ".exp.xml" - assertEqual "" expected $ Text.pack actual + assertEqual "" expected $ hackyStringIgnoreContext actual assertEval :: Options -> [FilePath] -> Assertion assertEval _opts files = do