[darcs-users] darcs patch: Add Repository IO monad (and 1 more)
David Roundy
daveroundy at gmail.com
Mon Sep 1 14:32:06 UTC 2008
On Fri, Aug 29, 2008 at 5:59 PM, Jason Dagit <dagit at codersbase.com> wrote:
> On Fri, Aug 29, 2008 at 2:46 PM, David Roundy <droundy at darcs.net> 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 <dagit at codersbase.com>
>>> * Add Repository IO monad
>>>
>>> Fri Aug 29 08:47:19 PDT 2008 Jason Dagit <dagit at codersbase.com>
>>> * 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.
I was thinking not to put RIO in HashedRepo or DarcsRepo, at least not
until those modules come in for a major rewrite. But I don't know,
maybe we should move them over as well.
David
More information about the darcs-users
mailing list