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:
parent
492b8e895e
commit
2246580687
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user