Skip to content

Commit 1cb1352

Browse files
hasufellBodigrim
authored andcommitted
Deprecate System.Posix.IO.fdRead
1 parent 5fd5305 commit 1cb1352

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

System/Posix/IO.hsc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ createFileAt :: Maybe Fd -- ^ Optional directory file descriptor
119119
createFileAt fdMay name mode
120120
= openFdAt fdMay name WriteOnly defaultFileFlags{ trunc=True, creat=(Just mode) }
121121

122+
{-# DEPRECATED fdRead "This function is scheduled to be dropped in favor of 'System.Posix.IO.ByteString.fdRead', because decoding e.g. UTF-8 streams partially is unsafe." #-} -- deprecated in 2.8.0.0
122123
-- | Read data from an 'Fd' and convert it to a 'String' using the locale encoding.
123124
-- Throws an exception if this is an invalid descriptor, or EOF has been
124125
-- reached.

tests/Posix014.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# OPTIONS_GHC -Wno-deprecations #-}
12
-- !! Basic pipe usage
23
module Main (main) where
34

0 commit comments

Comments
 (0)