Skip to content

Commit

Permalink
Merge pull request #6563 from phadej/simplified-subsumption-ryan
Browse files Browse the repository at this point in the history
Adapt to simplified subsumption patch
  • Loading branch information
phadej authored Mar 4, 2020
2 parents bbe78f8 + 8dc7f0d commit c0dc305
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cabal/Distribution/FieldGrammar/FieldDescrs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fieldDescrPretty (F m) fn = pPretty <$> Map.lookup fn m

-- | Lookup a field value parser.
fieldDescrParse :: P.CabalParsing m => FieldDescrs s a -> P.FieldName -> Maybe (s -> m s)
fieldDescrParse (F m) fn = pParse <$> Map.lookup fn m
fieldDescrParse (F m) fn = (\f -> pParse f) <$> Map.lookup fn m

fieldDescrsToList
:: P.CabalParsing m
Expand Down
6 changes: 3 additions & 3 deletions Cabal/Distribution/Simple/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ withTempFileEx opts tmpDir template action =
(\(name, handle) -> do hClose handle
unless (optKeepTempFiles opts) $
handleDoesNotExist () . removeFile $ name)
(withLexicalCallStack (uncurry action))
(withLexicalCallStack (\x -> uncurry action x))

-- | Create and use a temporary directory.
--
Expand All @@ -1356,7 +1356,7 @@ withTempFileEx opts tmpDir template action =
withTempDirectory :: Verbosity -> FilePath -> String -> (FilePath -> IO a) -> IO a
withTempDirectory verbosity targetDir template f = withFrozenCallStack $
withTempDirectoryEx verbosity defaultTempFileOptions targetDir template
(withLexicalCallStack f)
(withLexicalCallStack (\x -> f x))

-- | A version of 'withTempDirectory' that additionally takes a
-- 'TempFileOptions' argument.
Expand All @@ -1367,7 +1367,7 @@ withTempDirectoryEx _verbosity opts targetDir template f = withFrozenCallStack $
(createTempDirectory targetDir template)
(unless (optKeepTempFiles opts)
. handleDoesNotExist () . removeDirectoryRecursive)
(withLexicalCallStack f)
(withLexicalCallStack (\x -> f x))

-----------------------------------
-- Safely reading and writing files
Expand Down

0 comments on commit c0dc305

Please sign in to comment.