
24 Feb
2009
24 Feb
'09
7:57 a.m.
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