On Fri, Aug 29, 2008 at 08:48:03AM -0700, Jason Dagit wrote:
> David,
>
> To help our discussion of this type error that is confusing me, here
> are all my local changes.
>
> Thanks,
> Jason
>
> Thu Aug 28 22:20:51 PDT 2008 Jason Dagit <[EMAIL PROTECTED]>
> * Add Repository IO monad
>
> Fri Aug 29 08:47:19 PDT 2008 Jason Dagit <[EMAIL PROTECTED]>
> * Type error debug patch
>
> hunk ./src/Darcs/Repository/InternalTypes.lhs 20
> \begin{code}
> {-# OPTIONS_GHC -cpp -fglasgow-exts #-}
> #include "gadts.h"
> -module Darcs.Repository.InternalTypes ( Repository(..), RepoType(..),
> Pristine(..)
> - , extractCache
> +module Darcs.Repository.InternalTypes ( Repository(..), RepoType(..),
> Pristine(..), RIO
> + , extractCache, (>>>=), (>>>),
> returnR, rIO
> + , getRepository
> ) where
Is there any reason we need to put RIO in InternalTypes? It'd be nicer
to have it in Internal, so we could avoid exporting it at all, and
then we wouldn't even need to audit any other code for misuse of the
unsafe RIO internals.
> hunk ./src/Darcs/Repository/Internal.lhs 727
> withGutsOf (Repo _ _ rf _) | format_has HashedInventory rf = id
> | otherwise = withSignalsBlocked
>
> -withRepository :: [DarcsFlag] -> (forall p C(r u t). RepoPatch p =>
> Repository p C(r u t) -> IO a) -> IO a
> +withRepository :: [DarcsFlag] -> (forall p C(r u). RepoPatch p => RIO p C(r
> u r r) a -> IO a) -> IO a
Here's the problem, this should be:
withRepository :: [DarcsFlag]
-> (forall p C(r u). RepoPatch p => RIO p C(r u r r) a)
-> IO a
and similarly for withRepositoryDirectory.
And of course withRepoLock isn't yet converted, but that's because you
haven't yet gotten around to it.
David
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users