1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Add Send constructor

This commit is contained in:
Rick Winfrey 2017-10-31 17:23:15 -07:00
parent fd7a99cfc3
commit d2e53d30aa

View File

@ -41,3 +41,11 @@ data Label a = Label { labelName :: a, labelStatement :: a }
instance Eq1 Label where liftEq = genericLiftEq
instance Ord1 Label where liftCompare = genericLiftCompare
instance Show1 Label where liftShowsPrec = genericLiftShowsPrec
-- | A send statement in Go (e.g. chan <- value)
data Send a = Send { sendReceiver :: a, sendValue :: a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable)
instance Eq1 Send where liftEq = genericLiftEq
instance Ord1 Send where liftCompare = genericLiftCompare
instance Show1 Send where liftShowsPrec = genericLiftShowsPrec