@@ -137,7 +137,7 @@ instance MonadExec IO where
137
137
(prog : args) -> do
138
138
(exitCode, out, _) <- liftIO $ readProcessWithExitCode (toString prog) (toString <$> args) " "
139
139
let
140
- t = Text. strip $ toText out
140
+ t = Text. strip $ fromString out
141
141
emsg = " program[" <> prog <> " ] args=" <> show args
142
142
case exitCode of
143
143
ExitSuccess ->
@@ -194,7 +194,7 @@ instance MonadInstantiate IO where
194
194
either
195
195
(\ e -> Left $ ErrorCall $ " Error parsing output of nix-instantiate: " <> show e)
196
196
pure
197
- (parseNixTextLoc $ toText out)
197
+ (parseNixTextLoc $ fromString out)
198
198
status -> Left $ ErrorCall $ " nix-instantiate failed: " <> show status <> " : " <> err
199
199
200
200
deriving
@@ -230,12 +230,12 @@ class
230
230
-- ** Instances
231
231
232
232
instance MonadEnv IO where
233
- getEnvVar = (<<$>>) toText . lookupEnv . toString
233
+ getEnvVar = (<<$>>) fromString . lookupEnv . toString
234
234
235
- getCurrentSystemOS = pure $ toText System.Info. os
235
+ getCurrentSystemOS = pure $ fromString System.Info. os
236
236
237
237
-- Invert the conversion done by GHC_CONVERT_CPU in GHC's aclocal.m4
238
- getCurrentSystemArch = pure $ toText $ case System.Info. arch of
238
+ getCurrentSystemArch = pure $ fromString $ case System.Info. arch of
239
239
" i386" -> " i686"
240
240
arch -> arch
241
241
@@ -438,7 +438,7 @@ addPath p =
438
438
either
439
439
throwError
440
440
pure
441
- =<< addToStore (toText $ takeFileName (coerce p)) p True False
441
+ =<< addToStore (fromString $ takeFileName (coerce p)) p True False
442
442
443
- toFile_ :: (Framed e m , MonadStore m ) => Path -> String -> m StorePath
444
- toFile_ p contents = addTextToStore (toText p) (toText contents) mempty False
443
+ toFile_ :: (Framed e m , MonadStore m ) => Path -> Text -> m StorePath
444
+ toFile_ p contents = addTextToStore (toText p) contents mempty False
0 commit comments