1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

🔥 OVERLAPPABLE.

This commit is contained in:
Rob Rix 2019-10-08 15:37:52 -04:00
parent 711ec1957d
commit 3334ec81d3
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -40,18 +40,15 @@ type family (a :: Side) <> (b :: Side) :: Side where
class Element' (side :: Side) sub sup where
prj' :: sup a -> Maybe (sub a)
instance {-# OVERLAPPABLE #-}
Element' 'Here t t where
instance Element' 'Here t t where
prj' = Just
instance {-# OVERLAPPABLE #-}
Element t l
instance Element t l
=> Element' 'L t (l :+: r) where
prj' (L1 l) = prj l
prj' _ = Nothing
instance {-# OVERLAPPABLE #-}
Element t r
instance Element t r
=> Element' 'R t (l :+: r) where
prj' (R1 r) = prj r
prj' _ = Nothing