Skip to content

Commit a1d4fe7

Browse files
committed
WS was added for a reason. Remove redundant liftIO
1 parent 2564c49 commit a1d4fe7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/Stack2nix.hs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,17 +196,17 @@ packages2nix args pkgs =
196196
let path = dir </> subdir
197197
cabalFiles <- liftIO $ findCabalFiles (argHpackUse args) path
198198
forM cabalFiles $ \cabalFile -> do
199-
let pkg = cabalFilePkgName cabalFile
200-
nix = pkg <.> "nix"
201-
nixFile = argOutputDir args </> nix
202-
subdir' = if subdir == "." then Nothing
203-
else Just subdir
204-
src = Just $ C2N.Git url rev (Just sha256) subdir'
205-
liftIO $ createDirectoryIfMissing True (takeDirectory nixFile)
206-
liftIO $ writeDoc nixFile =<<
207-
prettyNix <$> cabal2nix True (argDetailLevel args) src cabalFile
208-
liftIO $ appendCache (argCacheFile args) url rev subdir sha256 pkg nix
209-
return (fromString pkg, fromString pkg $= mkPath False nix)
199+
let pkg = cabalFilePkgName cabalFile
200+
nix = pkg <.> "nix"
201+
nixFile = argOutputDir args </> nix
202+
subdir' = if subdir == "." then Nothing
203+
else Just subdir
204+
src = Just $ C2N.Git url rev (Just sha256) subdir'
205+
createDirectoryIfMissing True (takeDirectory nixFile)
206+
writeDoc nixFile =<<
207+
prettyNix <$> cabal2nix True (argDetailLevel args) src cabalFile
208+
appendCache (argCacheFile args) url rev subdir sha256 pkg nix
209+
return (fromString pkg, fromString pkg $= mkPath False nix)
210210

211211
defaultNixContents :: String
212212
defaultNixContents = unlines

0 commit comments

Comments
 (0)