1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

Define assignment syntax.

This commit is contained in:
Rob Rix 2017-05-02 11:26:02 -04:00
parent 492b8e895e
commit 2246580687

View File

@ -30,6 +30,16 @@ instance Eq1 Pattern where liftEq = genericLiftEq
instance Show1 Pattern where liftShowsPrec = genericLiftShowsPrec instance Show1 Pattern where liftShowsPrec = genericLiftShowsPrec
-- Assignment
-- | Assignment to a variable or other lvalue.
data Assignment a = Assignment { assignmentTarget :: !a, assignmentValue :: !a }
deriving (Eq, Foldable, Functor, Generic1, Show, Traversable)
instance Eq1 Assignment where liftEq = genericLiftEq
instance Show1 Assignment where liftShowsPrec = genericLiftShowsPrec
-- Returns -- Returns
newtype Return a = Return a newtype Return a = Return a