[darcs-devel] darcs patch
Juliusz Chroboczek
jch at pps.jussieu.fr
Thu Sep 16 00:01:47 PDT 2004
Thu Sep 16 08:58:29 CEST 2004 Juliusz Chroboczek <jch at pps.jussieu.fr>
* Make _darcs/current polymorphic.
This allows multiple formats for _darcs/current. Currently, two
formats are implemented:
- PlainCurrent, the directory _darcs/current that we all know and love;
- NoCurrent, just a placeholder file _darcs/current.none.
A third format, HashedCurrent, is planned but not implemented yet
(there are stubs in Current.lhs).
You can convert to the NoCurrent format by doing
$ rm -r _darcs/current
$ touch _darcs/current.none
and convert back to PlainCurrent by doing
$ rm _darcs/current.none
$ mkdir _darcs/current
$ darcs repair
There are two problems with this code that I was unable to solve.
First, getCurrentPop in Population.lhs is a gross violation of
modularity; it is actually the only reason why Current is not abstract
(it has to export PlainCurrent). Second, surely_slurp_Current in
Repository.lhs leaves a temporary directory after darcs terminates;
we're bitten by the laziness of slurp. These problems should be
solved before release.
Converting Current to be a type class instead of an algebraic
datatype is left as an exercice for the reader (hint: you need
existential types).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 18371 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20040916/fda6edc5/attachment.bin
-------------- next part --------------
More information about the darcs-devel
mailing list