DON'T SCREEN THIS YET. This bundle is involved in issue2036, but I think
Gabriel is going to send a depless variant of the second patch.
I think it should be safe for me to both screen and apply the first
patch.
Ignoring applyToWorking return value is safe
--------------------------------------------
> --- Warning: A do-notation statement discarded a result of type Repository p r x t.
> _ <- applyToWorking repository opts pw `catch` \(e :: SomeException) ->
Looks good. Lots of warning removals like this.
(If I recall correctly, these warning comments were inserted so that we can
enable the warnings firing for any new code we write with do notation. It's a
trick that could be worth sharing with other Haskellers if they have big-gish
code bases, so they can benefit from the GHC 6.12 warnings without getting
annoyed by the sheer quantity from old code).
Darcs.Repository.Internal.applyToWorking seems to return a copy of the
repository which gets assigned a different type (witnesses)
applyToWorking :: RepoPatch p => Repository p C(r u t) -> [DarcsFlag] -> FL (PrimOf p) C(u y) -> IO (Repository p C(r y t))
applyToWorking (Repo r ropts rf (DarcsRepository t c)) opts patch =
do withCurrentDirectory r $ if Quiet `elem` opts
then runSilently $ apply patch
else runTolerantly $ apply patch
return (Repo r ropts rf (DarcsRepository t c))
But we never need to the repository again.
Remove redundant Packs and NoPacks
----------------------------------
> Alexey Levan <exlevan@gmail.com>**20101122111702
> Ignore-this: 904514279a7cc9a52b0676d3ee811a7a
> ]
> > hunk ./src/Darcs/Repository.hs 129
> import Darcs.Witnesses.Sealed ( Sealed(..), FlippedSeal(..), flipSeal )
>
> import Darcs.Flags ( DarcsFlag( Quiet, Lazy, Complete,
> - AllowUnrelatedRepos, NoUpdateWorking,
> - Packs, NoPacks )
> + AllowUnrelatedRepos, NoUpdateWorking)
If we're not using them, we're not using them.
Still looking forward to a flags overhaul one day
*so much to do!*
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:kowey@jabber.fr (Jabber or Google Talk only)
|