outputChanged :: FL.Ref TextBuffer -> T.Text -> IO Bool
outputChanged buffer newText = do
  oldText <- getText buffer
  if (not (T.null oldText))
    then do
      let oldLastLine = Prelude.head (Prelude.reverse (T.lines oldText))
      return (newText /= oldLastLine)
    else return (not (T.null newText))
outputChanged :: FL.Ref TextBuffer -> T.Text -> IO Bool
outputChanged buffer newText = do
  oldText <- getText buffer
  if (not (T.null oldText))
    then do
      let oldLastLine = Prelude.head (Prelude.reverse (T.lines oldText))
      return (newText /= oldLastLine)
    else return (not (T.null newText))
outputChanged buffer newText = do
  oldText <- getText buffer
  if (not (T.null oldText))
    then do
      let oldLastLine = Prelude.head (Prelude.reverse (T.lines oldText))
      return (newText /= oldLastLine)
    else return (not (T.null newText))