On Fri, Aug 29, 2008 at 2:46 PM, David Roundy <[EMAIL PROTECTED]> wrote:
> 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.
Sure. If we try to use RIO in HashedRepo or DarcsRepo it will likely
become a problem though. if I recall correctly that's exactly why
Repository exists in InternalTypes.lhs that's why I defaulted to
putting it with Repository.
>> 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.
Gah! I feel stupid. I think I had that type for a while, but then
didn't update job1 and job2 to match and then had these errors about
IO a and just well...yeah. Thanks!
> And of course withRepoLock isn't yet converted, but that's because you
> haven't yet gotten around to it.
My supply of round tuits is getting low :)
Thanks,
Jason
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users