mirror of
https://github.com/github/semantic.git
synced 2024-12-20 05:11:44 +03:00
remove unused Subterm bits
This commit is contained in:
parent
ef93c452c6
commit
a6138760a8
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user