-
-
Notifications
You must be signed in to change notification settings - Fork 414
Closed
Labels
component: wingmantype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Description
data Var = Var
{ t_group :: OneOf Int
, t_index :: OneOf (Maybe Int)
}
instance Semigroup Var where
(<>) = _
data OneOf a
= Anything
| NoneOf (Set a)
| OneOf (Set a)
deriving (Eq, Ord, Show, Foldable)
instance Ord a => Semigroup (OneOf a) where
(<>) Anything b = b
(<>) a Anything = a
(<>) (NoneOf sa3) (NoneOf sa) = NoneOf $ sa3 <> sa
(<>) (OneOf sa3) (NoneOf sa) = OneOf $ sa3 S.\\ sa
(<>) (NoneOf sa3) (OneOf sa) = OneOf $ sa S.\\ sa3
(<>) (OneOf sa3) (OneOf sa) = OneOf $ S.intersection sa3 sa
instance Ord a => Monoid (OneOf a) where
mempty = AnythingNot sure why
Metadata
Metadata
Assignees
Labels
component: wingmantype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..