File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,10 @@ main' opts@Options{..} = runWithBasicEffectsIO opts execContentsFilesOrRepl
78
78
79
79
-- | The `--read` option: load expression from a serialized file.
80
80
loadBinaryCacheFile =
81
- (\ binaryCacheFile ->
81
+ (\ ( binaryCacheFile :: Path ) ->
82
82
do
83
- let file = replaceExtension binaryCacheFile " nixc"
84
- processCLIOptions (Just $ coerce file) =<< liftIO (readCache $ coerce binaryCacheFile)
83
+ let file = coerce $ ( replaceExtension . coerce) binaryCacheFile " nixc"
84
+ processCLIOptions (Just file) =<< liftIO (readCache $ binaryCacheFile)
85
85
) <$> readFrom
86
86
87
87
-- | The `--expr` option: read expression from the argument string
@@ -95,7 +95,7 @@ main' opts@Options{..} = runWithBasicEffectsIO opts execContentsFilesOrRepl
95
95
(processSeveralFiles . (coerce . toString <$> ) . lines <=< liftIO) .
96
96
(\ case
97
97
" -" -> Text. getContents
98
- _fp -> Text. readFile _fp
98
+ _fp -> readFile $ coerce _fp
99
99
) <$> fromFile
100
100
101
101
processExpr text = handleResult Nothing $ parseNixTextLoc text
Original file line number Diff line number Diff line change @@ -13,30 +13,30 @@ data Options = Options
13
13
, thunks :: Bool
14
14
, values :: Bool
15
15
, showScopes :: Bool
16
- , reduce :: Maybe FilePath
16
+ , reduce :: Maybe Path
17
17
, reduceSets :: Bool
18
18
, reduceLists :: Bool
19
19
, parse :: Bool
20
20
, parseOnly :: Bool
21
21
, finder :: Bool
22
- , findFile :: Maybe FilePath
22
+ , findFile :: Maybe Path
23
23
, strict :: Bool
24
24
, evaluate :: Bool
25
25
, json :: Bool
26
26
, xml :: Bool
27
27
, attr :: Maybe Text
28
- , include :: [FilePath ]
28
+ , include :: [Path ]
29
29
, check :: Bool
30
- , readFrom :: Maybe FilePath
30
+ , readFrom :: Maybe Path
31
31
, cache :: Bool
32
32
, repl :: Bool
33
33
, ignoreErrors :: Bool
34
34
, expression :: Maybe Text
35
35
, arg :: [(Text , Text )]
36
36
, argstr :: [(Text , Text )]
37
- , fromFile :: Maybe FilePath
37
+ , fromFile :: Maybe Path
38
38
, currentTime :: UTCTime
39
- , filePaths :: [FilePath ]
39
+ , filePaths :: [Path ]
40
40
}
41
41
deriving Show
42
42
You can’t perform that action at this time.
0 commit comments