
11 Aug
2006
11 Aug
'06
10:16 p.m.
John Meacham wrote:
does anyone else think this would be useful to provide?
module Data.Perhaps where
data Perhaps = No | Maybe | Yes deriving(Eq,Ord,Show,Read,Enum,Bounded)
instance Monoid Perhaps ... ...
I only ask because it has come up as useful several times in projects I work on.
I think "Maybe Bool" is better for this. It already separates out for you the notion of certainty vs. uncertainty. What Monoid did you have in mind for it? -- Ashley Yakeley