mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Define an Element instance for matching on the left.
This commit is contained in:
parent
fe76c3dca6
commit
4199011b42
@ -143,3 +143,8 @@ instance {-# OVERLAPPABLE #-}
|
||||
reassoc (L1 (L1 l)) = L1 l
|
||||
reassoc (L1 (R1 l)) = R1 (L1 l)
|
||||
reassoc (R1 r) = R1 (R1 r)
|
||||
|
||||
instance {-# OVERLAPPABLE #-}
|
||||
Element t (t :+: r) where
|
||||
prj (L1 l) = Just l
|
||||
prj _ = Nothing
|
||||
|
Loading…
Reference in New Issue
Block a user