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

Add Defer constructor

This commit is contained in:
Rick Winfrey 2017-11-01 12:01:40 -07:00
parent 4a0544072a
commit 4db08d3b29

View File

@ -49,3 +49,11 @@ data Send a = Send { sendReceiver :: !a, sendValue :: !a }
instance Eq1 Send where liftEq = genericLiftEq
instance Ord1 Send where liftCompare = genericLiftCompare
instance Show1 Send where liftShowsPrec = genericLiftShowsPrec
-- | A defer statement in Go (e.g. defer x())
newtype Defer a = Defer { deferBody :: a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable)
instance Eq1 Defer where liftEq = genericLiftEq
instance Ord1 Defer where liftCompare = genericLiftCompare
instance Show1 Defer where liftShowsPrec = genericLiftShowsPrec