diff --git a/src/Data/Abstract/Declarations.hs b/src/Data/Abstract/Declarations.hs index 494db37e0..77b00102d 100644 --- a/src/Data/Abstract/Declarations.hs +++ b/src/Data/Abstract/Declarations.hs @@ -7,7 +7,6 @@ module Data.Abstract.Declarations import Data.Abstract.Name import Data.Sum import Data.Term -import Prologue class Declarations syntax where declaredName :: syntax -> Maybe Name @@ -20,9 +19,6 @@ class Declarations1 syntax where liftDeclaredName :: (a -> Maybe Name) -> syntax a -> Maybe Name liftDeclaredName _ _ = Nothing -instance Declarations t => Declarations (Subterm t a) where - declaredName = declaredName . subterm - deriving instance Declarations1 syntax => Declarations (Term syntax ann) instance (Declarations recur, Declarations1 syntax) => Declarations (TermF syntax ann recur) where diff --git a/src/Data/Abstract/FreeVariables.hs b/src/Data/Abstract/FreeVariables.hs index 0010904e2..637936c26 100644 --- a/src/Data/Abstract/FreeVariables.hs +++ b/src/Data/Abstract/FreeVariables.hs @@ -24,9 +24,6 @@ class FreeVariables1 syntax where default liftFreeVariables :: (Foldable syntax) => (a -> Set Name) -> syntax a -> Set Name liftFreeVariables = foldMap -instance FreeVariables t => FreeVariables (Subterm t a) where - freeVariables = freeVariables . subterm - deriving instance FreeVariables1 syntax => FreeVariables (Term syntax ann) instance (FreeVariables recur, FreeVariables1 syntax) => FreeVariables (TermF syntax ann recur) where