Fix compilation

This commit is contained in:
Domen Kožar 2018-11-25 10:01:14 +00:00
parent ed07384563
commit 51d493f484
No known key found for this signature in database
GPG Key ID: C2FFBCAFD2C24246
3 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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