mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
🔥 OVERLAPPABLE.
This commit is contained in:
parent
711ec1957d
commit
3334ec81d3
@ -40,18 +40,15 @@ type family (a :: Side) <> (b :: Side) :: Side where
|
|||||||
class Element' (side :: Side) sub sup where
|
class Element' (side :: Side) sub sup where
|
||||||
prj' :: sup a -> Maybe (sub a)
|
prj' :: sup a -> Maybe (sub a)
|
||||||
|
|
||||||
instance {-# OVERLAPPABLE #-}
|
instance Element' 'Here t t where
|
||||||
Element' 'Here t t where
|
|
||||||
prj' = Just
|
prj' = Just
|
||||||
|
|
||||||
instance {-# OVERLAPPABLE #-}
|
instance Element t l
|
||||||
Element t l
|
|
||||||
=> Element' 'L t (l :+: r) where
|
=> Element' 'L t (l :+: r) where
|
||||||
prj' (L1 l) = prj l
|
prj' (L1 l) = prj l
|
||||||
prj' _ = Nothing
|
prj' _ = Nothing
|
||||||
|
|
||||||
instance {-# OVERLAPPABLE #-}
|
instance Element t r
|
||||||
Element t r
|
|
||||||
=> Element' 'R t (l :+: r) where
|
=> Element' 'R t (l :+: r) where
|
||||||
prj' (R1 r) = prj r
|
prj' (R1 r) = prj r
|
||||||
prj' _ = Nothing
|
prj' _ = Nothing
|
||||||
|
Loading…
Reference in New Issue
Block a user