diff options
Diffstat (limited to 'KikiD/GetLine.hs')
-rw-r--r-- | KikiD/GetLine.hs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/KikiD/GetLine.hs b/KikiD/GetLine.hs deleted file mode 100644 index 8af5dc6..0000000 --- a/KikiD/GetLine.hs +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | module KikiD.GetLine where | ||
2 | |||
3 | import Control.Monad | ||
4 | import Data.Serialize | ||
5 | import qualified Data.ByteString as BS | ||
6 | import qualified Data.ByteString.Lazy as L | ||
7 | import Data.Monoid | ||
8 | import Data.Binary.Builder | ||
9 | |||
10 | getLine :: Get BS.ByteString | ||
11 | getLine = getWords empty | ||
12 | where | ||
13 | getWords b = do | ||
14 | w <- getWord8 | ||
15 | let x = singleton w | ||
16 | if (w == 10 || w == 0) | ||
17 | then return $ BS.concat . L.toChunks . toLazyByteString $ b <> x | ||
18 | else getWords (b <> x) | ||