Skip to content

Commit 3ade64c

Browse files
authored
Merge pull request haskell#10411 from haskell/mergify/bp/3.14/pr-10404
Prefer ErrorCall to ErrorCallWithLocation (backport haskell#10404)
2 parents 57cbb08 + 3cdc0a2 commit 3ade64c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cabal-syntax/src/Distribution/Compat/Binary.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ decodeOrFailIO :: Binary a => ByteString -> IO (Either String a)
2020
decodeOrFailIO bs =
2121
catch (evaluate (decode bs) >>= return . Right) handler
2222
where
23-
handler (ErrorCallWithLocation str _) = return $ Left str
23+
handler (ErrorCall str) = return $ Left str

Cabal-syntax/src/Distribution/Utils/Structured.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ structuredDecodeOrFailIO :: (Binary.Binary a, Structured a) => LBS.ByteString ->
277277
structuredDecodeOrFailIO bs =
278278
catch (evaluate (structuredDecode bs) >>= return . Right) handler
279279
where
280-
handler (ErrorCallWithLocation str _) = return $ Left str
280+
handler (ErrorCall str) = return $ Left str
281281

282282
-- | Lazily reconstruct a value previously written to a file.
283283
structuredDecodeFileOrFail :: (Binary.Binary a, Structured a) => FilePath -> IO (Either String a)

0 commit comments

Comments
 (0)