|
2 | 2 | {-# LANGUAGE MagicHash #-} |
3 | 3 | {-# OPTIONS_HADDOCK prune #-} |
4 | 4 | {-# LANGUAGE Trustworthy #-} |
| 5 | +{-# OPTIONS_GHC -Wno-deprecations #-} |
5 | 6 |
|
6 | 7 | -- | |
7 | 8 | -- Module : Data.ByteString.Char8 |
@@ -269,10 +270,10 @@ import Data.ByteString (null,length,tail,init,append |
269 | 270 | ,isInfixOf,stripPrefix,stripSuffix |
270 | 271 | ,breakSubstring,copy,group |
271 | 272 |
|
272 | | - ,getLine, getContents, putStr, interact |
| 273 | + ,getContents, putStr, interact |
273 | 274 | ,readFile, writeFile, appendFile |
274 | 275 | ,hGetContents, hGet, hGetSome, hPut, hPutStr |
275 | | - ,hGetLine, hGetNonBlocking, hPutNonBlocking |
| 276 | + ,hGetNonBlocking, hPutNonBlocking |
276 | 277 | ,packCString,packCStringLen |
277 | 278 | ,useAsCString,useAsCStringLen |
278 | 279 | ) |
@@ -997,6 +998,14 @@ unwords = intercalate (singleton ' ') |
997 | 998 | ------------------------------------------------------------------------ |
998 | 999 | -- For non-binary text processing: |
999 | 1000 |
|
| 1001 | +-- | Read a line from stdin. |
| 1002 | +getLine :: IO ByteString |
| 1003 | +getLine = B.getLine |
| 1004 | + |
| 1005 | +-- | Read a line from a handle |
| 1006 | +hGetLine :: Handle -> IO ByteString |
| 1007 | +hGetLine = B.hGetLine |
| 1008 | + |
1000 | 1009 | -- | Write a ByteString to a handle, appending a newline byte. |
1001 | 1010 | -- |
1002 | 1011 | -- Unlike 'hPutStr', this is not atomic: other threads might write |
|
0 commit comments