mzero = Nothing
instance MonadOr Maybe where
- morelse (Just a) _ = Just a
+ morelse a@(Just _) _ = a
morelse _ b = b
"`execJust v f` executes the function `f` with parameter value `x`, if `v=Just x`. If `v=Nothing`, the function does nothing."
@JavaName getComponent
variantComponent :: Variant -> ChildReference -> Variant
+variant :: Serializable a => a -> Variant
+variant v = variantOfWithBinding binding v
+
variantValue :: Serializable a => Variant -> a
variantValue v = variantValue_ v binding