1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 02:14:20 +03:00

remove unused Subterm bits

This commit is contained in:
Charlie Somerville 2018-10-02 11:32:51 +10:00
parent ef93c452c6
commit a6138760a8
2 changed files with 0 additions and 7 deletions

View File

@ -7,7 +7,6 @@ module Data.Abstract.Declarations
import Data.Abstract.Name import Data.Abstract.Name
import Data.Sum import Data.Sum
import Data.Term import Data.Term
import Prologue
class Declarations syntax where class Declarations syntax where
declaredName :: syntax -> Maybe Name declaredName :: syntax -> Maybe Name
@ -20,9 +19,6 @@ class Declarations1 syntax where
liftDeclaredName :: (a -> Maybe Name) -> syntax a -> Maybe Name liftDeclaredName :: (a -> Maybe Name) -> syntax a -> Maybe Name
liftDeclaredName _ _ = Nothing liftDeclaredName _ _ = Nothing
instance Declarations t => Declarations (Subterm t a) where
declaredName = declaredName . subterm
deriving instance Declarations1 syntax => Declarations (Term syntax ann) deriving instance Declarations1 syntax => Declarations (Term syntax ann)
instance (Declarations recur, Declarations1 syntax) => Declarations (TermF syntax ann recur) where instance (Declarations recur, Declarations1 syntax) => Declarations (TermF syntax ann recur) where

View File

@ -24,9 +24,6 @@ class FreeVariables1 syntax where
default liftFreeVariables :: (Foldable syntax) => (a -> Set Name) -> syntax a -> Set Name default liftFreeVariables :: (Foldable syntax) => (a -> Set Name) -> syntax a -> Set Name
liftFreeVariables = foldMap liftFreeVariables = foldMap
instance FreeVariables t => FreeVariables (Subterm t a) where
freeVariables = freeVariables . subterm
deriving instance FreeVariables1 syntax => FreeVariables (Term syntax ann) deriving instance FreeVariables1 syntax => FreeVariables (Term syntax ann)
instance (FreeVariables recur, FreeVariables1 syntax) => FreeVariables (TermF syntax ann recur) where instance (FreeVariables recur, FreeVariables1 syntax) => FreeVariables (TermF syntax ann recur) where