On Fri, Sep 5, 2008 at 3:03 AM, Jason Dagit <[EMAIL PROTECTED]> wrote:
> This is yet another resend of my patches to make the commands
> compile. All my previous comments apply here (eg., please give
> feedback if you think something is wrong so I know what to fix). The
> last patch in the bundle is the one that fixes the conflicts with
> Mornfall's recent changes. I think if you apply just about any
> portion of the bundle you'll need that patch.
>
> If you do think some things need fixing I'd rather have you be biased
> towards applying these patches and having me send improvements. The
> reason is because people keep sending patches that conflict with these
> and it's painful for me to keep redoing them. On the other hand, if
> this work was part of darcs then I could send in minor refinements and
> deal with much smaller bits of conflicts. As an example, I want to
> send in some refinements based on Eric's feedback but I'm afraid to do
> it until this larger body of work is accepted.
I'm afraid that I'm still biased against this set of patches, just
because it seems the wrong approach--although I haven't yet taken a
look at the new set. But switching code first to compile with type
witnesses and only later to use type witnesses seems a lot like
putting the cart before the horse. I'd rather do the two operations
at the same time, since code with incorrect type witnesses is both
deceptive and buggy. The bugs may not have any effect on the
operation of darcs, but they're still present, impeding future work on
type witnesses, and confusing anyone trying to learn to work with type
witnesses by reading the darcs source code.
In any case, this patch bundle fails to compile on ghc 6.6, with an
error in Internal. I'm afraid I don't have time just now to debug
this.
David
[ghc] src/Darcs/Repository/Internal.o
src/Darcs/Repository/Internal.lhs:806:4:
Couldn't match expected type `forall p. (RepoPatch p) => RIO p a'
against inferred type `a1 b'
In the second argument of `($)', namely
`do (repository@(Repo _ _ rf _)) <- getRepository
case write_problem rf of
Nothing -> return ()
Just err -> fail err
let name = "./" ++ (darcsdir ++ "/lock")
wu :: IO a -> IO a
wu = case (getUMask opts) of
Nothing -> ...
Just u -> ...
rIO
$ (wu
$ (if DryRun `elem` opts then
unsafeUnRIO job repository
else
do revertRepositoryChanges repository
(withLock name) $ (unsafeUnRIO job repository)))'
In the expression:
(withRepository opts)
$ (do (repository@(Repo _ _ rf _)) <- getRepository
case write_problem rf of
Nothing -> return ()
Just err -> fail err
let name = "./" ++ (darcsdir ++ "/lock")
wu :: IO a -> IO a
wu = case (getUMask opts) of
Nothing -> ...
Just u -> ...
rIO
$ (wu
$ (if DryRun `elem` opts then
unsafeUnRIO job repository
else
do revertRepositoryChanges repository
(withLock name) $ (unsafeUnRIO job repository))))
In the definition of `withRepoLock':
withRepoLock opts job
= (withRepository opts)
$ (do (repository@(Repo _ _ rf _)) <- getRepository
case write_problem rf of
Nothing -> return ()
Just err -> fail err
let name = "./" ++ (darcsdir ++ "/lock")
wu :: IO a -> IO a
wu = case ... of
Nothing -> ...
Just u -> ...
rIO
$ (wu
$ (if DryRun `elem` opts then
unsafeUnRIO job repository
else
do revertRepositoryChanges repository
(withLock name) $ (unsafeUnRIO job
repository))))
src/Darcs/Repository/Internal.lhs:823:4:
Couldn't match expected type `forall p. (RepoPatch p) => RIO p a'
against inferred type `a1 b'
In the second argument of `($)', namely
`do (repository@(Repo _ _ rf _)) <- getRepository
case write_problem rf of
Nothing -> return ()
Just err -> fail err
let name = "./" ++ (darcsdir ++ "/lock")
wu = case (getUMask opts) of
Nothing -> ...
Just u -> ...
rIO
$ (wu
$ (if (format_has HashedInventory rf) || (DryRun `elem` opts) then
unsafeUnRIO job repository
else
do revertRepositoryChanges repository
(withLock name) $ (unsafeUnRIO job repository)))'
In the expression:
(withRepository opts)
$ (do (repository@(Repo _ _ rf _)) <- getRepository
case write_problem rf of
Nothing -> return ()
Just err -> fail err
let name = "./" ++ (darcsdir ++ "/lock")
wu = case (getUMask opts) of
Nothing -> ...
Just u -> ...
rIO
$ (wu
$ (if (format_has HashedInventory rf) || (DryRun `elem` opts)
then
unsafeUnRIO job repository
else
do revertRepositoryChanges repository
(withLock name) $ (unsafeUnRIO job repository))))
In the definition of `withRepoReadLock':
withRepoReadLock opts job
= (withRepository opts)
$ (do (repository@(Repo _ _ rf _)) <- getRepository
case write_problem rf of
Nothing -> return ()
Just err -> fail err
let name = "./" ++ (darcsdir ++ "/lock")
wu = case ... of
Nothing -> ...
Just u -> ...
rIO
$ (wu
$ (if (format_has HashedInventory rf) ||
(DryRun `elem` opts) then
unsafeUnRIO job repository
else
do revertRepositoryChanges repository
(withLock name) $ (unsafeUnRIO
job repository))))
make: *** [src/Darcs/Repository/Internal.o] Error 1
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users