Another round of patches that aim at isolating the module Darcs.Arguments
from low-level parts (patch- and repo-related code).
The first patch moves a couple of simple flag-related functions
from Darcs.Arguments to Darcs.Flags, making a few modules in Repository.*
stopping to depend on Darcs.Arguments. They still depend on Darcs.Flags,
but at least the dependency is more focussed now since a lot of code in
Repository.* already depends on Darcs.Flags.
The next patch just does what it says. As a consequence Darcs.Arguments
almost import nothing from Darcs.Patch.* anymore, and Darcs.PrintPatch and
Darcs.SelectChanges no longer depend on Darcs.Arguments, but on Darcs.Flags.
Darcs.Commands and Darcs.Commands.Changes now depend on Darcs.PrintPatch
to have showFriendly.
Finally, "rm Darcs.Patch.MatchData" is about removing from Darcs.Arguments
any direct dependency to Darcs.Patch.*, by just using the type 'String'
inside the flags, instead of Darcs.Patch.MatchData.PatchMatch. Hence
Darcs.Arguments (and Darcs.Flags by the way) no longer depend on anything
The patch also deletes the module Darcs.Patch.MatchData, a change that is
not necessary if the idea is just to isolate Darcs.Arguments, but I
realised that MatchData was a pretty useless wrapper around String.
Its only feature is a Show instance that prefixes the pattern with the word
'pattern', and is only used when a range match fails. Anyway when such an
error happens, the patterns are already prefixed by
"Invalid index range match given to matchPatch:".
Hence I'm happy to throw away a piece of over-abstraction.
3 patches for repository http://darcs.net:
Mon May 28 16:07:06 ART 2012 Guillaume Hoffmann <email@example.com>
* make that no repository-related modules depend on Darcs.Arguments
Mon May 28 16:56:55 ART 2012 Guillaume Hoffmann <firstname.lastname@example.org>
* move function showFriendly from Darcs.Arguments to Darcs.PrintPatch
Mon May 28 18:52:44 ART 2012 Guillaume Hoffmann <email@example.com>
* rm Darcs.Patch.MatchData making patterns simply String, style Arguments