Entries type: Re: tar-package was: Re: modules of cabal-install

Christian Maeder Christian.Maeder at dfki.de
Tue Feb 24 07:57:03 EST 2009


Duncan Coutts wrote:
>> Manipulating Entries is also not a typical user task. (Maybe the type
>> Entries should just be "[Either String Entry]", but the given type is
>> fine, as it only allows a final failure string)
> 
> Yeah I think only one failure is good.

 data Entries = Entries [Entry] (Maybe String)
or
 directly using "([Entry], Maybe String)"

is an alternative, where "Nothing" indicates no failure. This would
avoid the extra folding and mapping on Entries and maybe "unpack" could
then work on [Entry] only.

Cheers Christian



More information about the Libraries mailing list