File tree Expand file tree Collapse file tree 5 files changed +12
-14
lines changed Expand file tree Collapse file tree 5 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -106,12 +106,12 @@ main' iniVal =
106106 (prefixedCommand : xs) | Text. head prefixedCommand == commandPrefix ->
107107 do
108108 let
109- arguments = Text. unwords xs
109+ arguments = unwords xs
110110 command = Text. tail prefixedCommand
111111 optMatcher command options arguments
112- x -> cmd $ Text. unwords x
112+ x -> cmd $ unwords x
113113 )
114- (Text. words <$> lines f)
114+ (words <$> lines f)
115115
116116 handleMissing e
117117 | Error. isDoesNotExistError e = pure " "
@@ -332,12 +332,14 @@ quit _ = liftIO Exit.exitSuccess
332332-- | @:set@ command
333333setConfig :: (MonadNix e t f m , MonadIO m ) => Text -> Repl e t f m ()
334334setConfig args =
335- case Text. words args of
336- [] -> liftIO $ Text. putStrLn " No option to set specified"
337- (x: _xs) ->
335+ list
336+ ( liftIO $ Text. putStrLn " No option to set specified" )
337+ (\ ( x: _xs) ->
338338 case filter ((== x) . helpSetOptionName) helpSetOptions of
339339 [opt] -> modify (\ s -> s { replCfg = helpSetOptionFunction opt (replCfg s) })
340340 _ -> liftIO $ Text. putStrLn " No such option"
341+ )
342+ $ words args
341343
342344
343345-- * Interactive Shell
Original file line number Diff line number Diff line change 55{-# LANGUAGE KindSignatures #-}
66{-# LANGUAGE MonoLocalBinds #-}
77{-# LANGUAGE MultiWayIf #-}
8- {-# LANGUAGE PackageImports #-}
98{-# LANGUAGE PartialTypeSignatures #-}
109{-# LANGUAGE QuasiQuotes #-}
1110{-# LANGUAGE ScopedTypeVariables #-}
@@ -49,7 +48,6 @@ import qualified Data.HashMap.Lazy as M
4948import Data.Scientific
5049import qualified Data.Set as S
5150import qualified Data.Text as Text
52- import qualified Data.Text.Lazy as LazyText
5351import qualified Data.Text.Lazy.Builder as Builder
5452import Data.These ( fromThese )
5553import qualified Data.Time.Clock.POSIX as Time
@@ -1030,7 +1028,7 @@ replaceStringsNix tfrom tto ts =
10301028
10311029 -- 2021-02-18: NOTE: rly?: toStrict . toLazyText
10321030 -- Maybe `text-builder`, `text-show`?
1033- finish ctx output = makeNixString (LazyText. toStrict $ Builder. toLazyText output) ctx
1031+ finish ctx output = makeNixString (toStrict $ Builder. toLazyText output) ctx
10341032
10351033 replace (key, replacementNS, unprocessedInput) = replaceWithNixBug unprocessedInput updatedOutput
10361034
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ import Nix.Render
3333import Nix.Value
3434import qualified Paths_hnix
3535import System.Exit
36- import qualified System.Environment as Env
3736import System.FilePath ( takeFileName )
3837import qualified System.Info
3938import System.Process
@@ -235,7 +234,7 @@ class
235234-- ** Instances
236235
237236instance MonadEnv IO where
238- getEnvVar = (<<$>>) toText . Env. lookupEnv . toString
237+ getEnvVar = (<<$>>) toText . lookupEnv . toString
239238
240239 getCurrentSystemOS = pure $ toText System.Info. os
241240
Original file line number Diff line number Diff line change 22
33module Main where
44
5- import Prelude hiding (lookupEnv )
65import Relude.Unsafe (read )
76import qualified Control.Exception as Exc
87import GHC.Err (errorWithoutStackTrace )
@@ -25,7 +24,7 @@ import qualified PrettyTests
2524import qualified ReduceExprTests
2625import qualified PrettyParseTests
2726import System.Directory
28- import System.Environment (setEnv , lookupEnv )
27+ import System.Environment (setEnv )
2928import System.FilePath.Glob
3029import System.Posix.Files
3130import Test.Tasty
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ case_inherit_selector_syntax_mistakes =
222222
223223case_int_list =
224224 checks
225- ( mkList $ mkInt <$> [ i | i <- [ 1 ,2 ,3 ] ]
225+ ( mkList $ mkInt <$> [1 ,2 ,3 ]
226226 , " [1 2 3]"
227227 )
228228
You can’t perform that action at this time.
0 commit comments