-- | Feeder from ByteString
feederFromString :: ByteString -> IO Feeder
feederFromString bs = do
  r <- newIORef (Just bs)
  return $ f r
  where
    f r = do
      mb <- readIORef r
      writeIORef r Nothing
      return mb
feederFromString :: ByteString -> IO Feeder
feederFromString bs = do
  r <- newIORef (Just bs)
  return $ f r
  where
    f r = do
      mb <- readIORef r
      writeIORef r Nothing
      return mb
feederFromString bs = do
  r <- newIORef (Just bs)
  return $ f r
  where
    f r = do
      mb <- readIORef r
      writeIORef r Nothing
      return mb