insert :: Fiber -> Yarn -> IO ()
insert fib y = do
    seekable <- IO.hIsSeekable $ unYarn y
    when seekable $
        IO.hSeek h IO.SeekFromEnd 0
    LBS.hPutStrLn h $ Aeson.encode fib
  where
    !h = unYarn y
insert :: Fiber -> Yarn -> IO ()
insert fib y = do
    seekable <- IO.hIsSeekable $ unYarn y
    when seekable $
        IO.hSeek h IO.SeekFromEnd 0
    LBS.hPutStrLn h $ Aeson.encode fib
  where
    !h = unYarn y
insert fib y = do
    seekable <- IO.hIsSeekable $ unYarn y
    when seekable $
        IO.hSeek h IO.SeekFromEnd 0
    LBS.hPutStrLn h $ Aeson.encode fib
  where
    !h = unYarn y