From 3334ec81d38e30e0423a93f31d58622b97188c60 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 8 Oct 2019 15:37:52 -0400 Subject: [PATCH] :fire: OVERLAPPABLE. --- semantic-tags/src/AST/Element.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/semantic-tags/src/AST/Element.hs b/semantic-tags/src/AST/Element.hs index 50b6d2535..aae8357da 100644 --- a/semantic-tags/src/AST/Element.hs +++ b/semantic-tags/src/AST/Element.hs @@ -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