|This module defines a list type and operations on it; it further
provides functions which write in and out the list.
The goal is to make it easy for the user to store a large number of text buffers
and cycle among them, making edits as she goes. The idea is inspired by
"incremental reading", see http://en.wikipedia.org/wiki/Incremental_reading.
|Take an ArticleDB, and return the first Article and an ArticleDB - *without* that article.
|Get the first article in the list. We use the list to express relative priority;
the first is the most, the last least. We then just cycle through - every article gets equal time.
|We remove the old first article, and we stick it on the end of the
list using the presumably modified version.
|Insert a new article with top priority (that is, at the front of the list).
|In the background, serialize given ArticleDB out.
|Read in database from dbLocation and then parse it into an ArticleDB.
|The canonical location. We assume ~/.yi has been set up already.
|Returns the database as it exists on the disk, and the current Yi buffer contents.
Note that the Initializable typeclass gives us an empty Seq. So first we try the buffer
state in the hope we can avoid a very expensive read from disk, and if we find nothing
(that is, if we get an empty Seq), only then do we call readDB.
|Given an ArticleDB, dump the scheduled article into the buffer (replacing previous contents).
|Go to next one. This ignores the buffer, but it doesn't remove anything from the database.
However, the ordering does change.
|Delete current article (the article as in the database), and go to next one.
|The main action. We fetch the old database, we fetch the modified article from the buffer,
then we call the function updateSetLast which removes the first article and pushes our modified article
to the end of the list.
|Assume the buffer is an entirely new article just imported this second, and save it.
We don't want to use updateSetLast since that will erase an article.
|Produced by Haddock version 2.6.1|