@hackage merge0.2.0.0

A functor for consistent merging of information

Merge

data User = User
  { name :: Maybe Text
  , pubKey :: PublicKey
  }

mergeUsers :: Merge User User
mergeUsers =
  User
    <$> optional name
    <*> required pubKey

f :: User -> User -> Maybe User
f x y = runMerge mergeUsers x y