diff --git a/src/Data/Syntax/Declaration.hs b/src/Data/Syntax/Declaration.hs index 006e705ce..ff33fdaa3 100644 --- a/src/Data/Syntax/Declaration.hs +++ b/src/Data/Syntax/Declaration.hs @@ -71,17 +71,17 @@ instance Declarations1 Function where instance FreeVariables1 Function where liftFreeVariables freeVariables f@Function{..} = foldMap freeVariables f `Set.difference` foldMap freeVariables functionParameters -data Accessibility a = Public { unPublic :: a } - | Protected { unProtected :: a } - | Private { unPrivate :: a } - | Unknown - deriving (Diffable, Eq, Ord, Show, Foldable, Traversable, Functor, Generic1, Hashable1, ToJSONFields1, Named1, Message1, NFData1) +data Visibility a = Public { unPublic :: a } + | Protected { unProtected :: a } + | Private { unPrivate :: a } + | Unknown + deriving (Diffable, Eq, Ord, Show, Foldable, Traversable, FreeVariables1, Functor, Generic1, Hashable1, ToJSONFields1, Named1, Message1, NFData1) -instance Eq1 Accessibility where liftEq = genericLiftEq -instance Ord1 Accessibility where liftCompare = genericLiftCompare -instance Show1 Accessibility where liftShowsPrec = genericLiftShowsPrec +instance Eq1 Visibility where liftEq = genericLiftEq +instance Ord1 Visibility where liftCompare = genericLiftCompare +instance Show1 Visibility where liftShowsPrec = genericLiftShowsPrec -instance Evaluatable Accessibility +instance Evaluatable Visibility data Method a = Method { methodContext :: [a] , methodAccessibility :: a diff --git a/src/Language/Go/Assignment.hs b/src/Language/Go/Assignment.hs index df8590b42..082fb852e 100644 --- a/src/Language/Go/Assignment.hs +++ b/src/Language/Go/Assignment.hs @@ -31,13 +31,13 @@ import Data.ImportPath (importPath, defaultAlias) type Syntax = '[ Comment.Comment - , Declaration.Accessibility , Declaration.Constructor , Declaration.Function , Declaration.Method , Declaration.MethodSignature , Declaration.Type , Declaration.TypeAlias + , Declaration.Visibility , Expression.Plus , Expression.Minus , Expression.Times diff --git a/src/Language/Java/Assignment.hs b/src/Language/Java/Assignment.hs index b67aecab2..ff1572eeb 100644 --- a/src/Language/Java/Assignment.hs +++ b/src/Language/Java/Assignment.hs @@ -42,11 +42,11 @@ import Proto3.Suite (Named (..), Named1 (..)) type Syntax = '[ Comment.Comment - , Declaration.Accessibility , Declaration.Class , Declaration.InterfaceDeclaration , Declaration.Method , Declaration.VariableDeclaration + , Declaration.Visibility , Expression.Plus , Expression.Minus , Expression.Times diff --git a/src/Language/MiniRuby/Assignment.hs b/src/Language/MiniRuby/Assignment.hs index 1e56b5882..ededec023 100644 --- a/src/Language/MiniRuby/Assignment.hs +++ b/src/Language/MiniRuby/Assignment.hs @@ -39,9 +39,9 @@ import Prologue hiding (for) -- | Small version of Ruby syntax for testing the code rewriting pipeline. type Syntax = '[ Comment.Comment - , Declaration.Accessibility , Declaration.Function , Declaration.Method + , Declaration.Visibility , Expression.Minus , Expression.Plus , Expression.Times diff --git a/src/Language/PHP/Assignment.hs b/src/Language/PHP/Assignment.hs index 053d53161..f43210ef1 100644 --- a/src/Language/PHP/Assignment.hs +++ b/src/Language/PHP/Assignment.hs @@ -43,6 +43,7 @@ type Syntax = '[ , Declaration.Function , Declaration.Method , Declaration.VariableDeclaration + , Declaration.Visibility , Expression.Plus , Expression.Minus , Expression.Times diff --git a/src/Language/Ruby/Assignment.hs b/src/Language/Ruby/Assignment.hs index 00b4cbecd..62e9f0161 100644 --- a/src/Language/Ruby/Assignment.hs +++ b/src/Language/Ruby/Assignment.hs @@ -44,6 +44,7 @@ type Syntax = '[ Comment.Comment , Declaration.Function , Declaration.Method + , Declaration.Visibility , Directive.File , Directive.Line , Expression.Plus diff --git a/src/Language/TypeScript/Assignment.hs b/src/Language/TypeScript/Assignment.hs index a1ca86656..bc66e80d0 100644 --- a/src/Language/TypeScript/Assignment.hs +++ b/src/Language/TypeScript/Assignment.hs @@ -42,7 +42,6 @@ import Proto3.Suite (Named1(..), Named(..)) type Syntax = '[ Comment.Comment , Comment.HashBang - , Declaration.Accessibility , Declaration.Class , Declaration.Function , Declaration.Method @@ -51,6 +50,7 @@ type Syntax = '[ , Declaration.PublicFieldDefinition , Declaration.VariableDeclaration , Declaration.TypeAlias + , Declaration.Visibility , Expression.Plus , Expression.Minus , Expression.Times