Copyright | Samuel Schlesinger 2021 (c) |
---|---|
License | MIT |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Documentation
Describes the merging of two values of the same type
into some other type. Represented as a Maybe
valued
function, one can also think of this as a predicate
showing which pairs of values can be merged in this way.
data Example = Whatever { a :: Int, b :: Maybe Bool } mergeExamples :: Merge Example Example mergeExamples = Example <$> required a <*> optional b
merge :: (x -> x -> Maybe a) -> Merge x a Source #
The most general combinator for constructing Merge
s.