From 924ada57444475f45a406a43641a7dd0e5a8fe6a Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 4 Feb 2020 13:29:33 -0500 Subject: [PATCH] Apply stylish-haskell. --- semantic-go/src/Language/Go/Tags.hs | 2 +- semantic-java/src/Language/Java/Tags.hs | 2 +- semantic-python/src/Language/Python/Tags.hs | 2 +- semantic-ruby/src/Language/Ruby/Tags.hs | 14 +++++++------- semantic-tsx/src/Language/TSX/Tags.hs | 4 ++-- .../src/Language/TypeScript/Tags.hs | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/semantic-go/src/Language/Go/Tags.hs b/semantic-go/src/Language/Go/Tags.hs index 48294c21f..de4a5ecce 100644 --- a/semantic-go/src/Language/Go/Tags.hs +++ b/semantic-go/src/Language/Go/Tags.hs @@ -9,6 +9,7 @@ module Language.Go.Tags ) where import AST.Element +import AST.Token import Control.Effect.Reader import Control.Effect.Writer import Data.Text as Text @@ -18,7 +19,6 @@ import Source.Loc import Source.Source as Source import Tags.Tag import qualified Tags.Tagging.Precise as Tags -import AST.Token class ToTags t where tags diff --git a/semantic-java/src/Language/Java/Tags.hs b/semantic-java/src/Language/Java/Tags.hs index 6d7b5c005..dc9a404b0 100644 --- a/semantic-java/src/Language/Java/Tags.hs +++ b/semantic-java/src/Language/Java/Tags.hs @@ -8,6 +8,7 @@ module Language.Java.Tags ( ToTags(..) ) where +import AST.Token import Control.Effect.Reader import Control.Effect.Writer import GHC.Generics @@ -17,7 +18,6 @@ import Source.Range import Source.Source as Source import Tags.Tag import qualified Tags.Tagging.Precise as Tags -import AST.Token class ToTags t where tags diff --git a/semantic-python/src/Language/Python/Tags.hs b/semantic-python/src/Language/Python/Tags.hs index b308ff1d2..c3ff379ab 100644 --- a/semantic-python/src/Language/Python/Tags.hs +++ b/semantic-python/src/Language/Python/Tags.hs @@ -10,6 +10,7 @@ module Language.Python.Tags ) where import AST.Element +import AST.Token import Control.Effect.Reader import Control.Effect.Writer import Data.List.NonEmpty (NonEmpty (..)) @@ -22,7 +23,6 @@ import Source.Range import Source.Source as Source import Tags.Tag import qualified Tags.Tagging.Precise as Tags -import AST.Token class ToTags t where tags diff --git a/semantic-ruby/src/Language/Ruby/Tags.hs b/semantic-ruby/src/Language/Ruby/Tags.hs index 22d01a2e3..19b7713f5 100644 --- a/semantic-ruby/src/Language/Ruby/Tags.hs +++ b/semantic-ruby/src/Language/Ruby/Tags.hs @@ -12,6 +12,8 @@ module Language.Ruby.Tags ) where import AST.Element +import AST.Token +import qualified AST.Unmarshal as TS import Control.Effect.Reader import Control.Effect.State import Control.Effect.Writer @@ -25,8 +27,6 @@ import Source.Range as Range import Source.Source as Source import Tags.Tag import qualified Tags.Tagging.Precise as Tags -import AST.Token -import qualified AST.Unmarshal as TS class ToTags t where tags @@ -89,7 +89,7 @@ instance ToTags Rb.Class where where range' = case extraChildren of Prj Rb.Superclass { ann = Loc { byteRange = Range { end }}} : _ -> Range start end - _ -> Range start (getEnd expr) + _ -> Range start (getEnd expr) getEnd = Range.end . byteRange . TS.gann yield name = yieldTag name Class loc range' >> gtags t @@ -106,7 +106,7 @@ instance ToTags Rb.SingletonClass where where range' = case extraChildren of x : _ -> Range start (getStart x) - _ -> range + _ -> range getStart = Range.start . byteRange . TS.gann yield name = yieldTag name Class loc range' >> gtags t @@ -123,7 +123,7 @@ instance ToTags Rb.Module where where range' = case extraChildren of x : _ -> Range start (getStart x) - _ -> Range start (getEnd expr) + _ -> Range start (getEnd expr) getEnd = Range.end . byteRange . TS.gann getStart = Range.start . byteRange . TS.gann yield name = yieldTag name Module loc range' >> gtags t @@ -165,7 +165,7 @@ instance ToTags Rb.Method where where range' = case parameters of Just Rb.MethodParameters { ann = Loc { byteRange = Range { end } }} -> Range start end - _ -> Range start (getEnd name) + _ -> Range start (getEnd name) getEnd = Range.end . byteRange . TS.gann instance ToTags Rb.SingletonMethod where @@ -177,7 +177,7 @@ instance ToTags Rb.SingletonMethod where where range' = case parameters of Just Rb.MethodParameters { ann = Loc { byteRange = Range { end } }} -> Range start end - _ -> Range start (getEnd name) + _ -> Range start (getEnd name) getEnd = Range.end . byteRange . TS.gann instance ToTags Rb.Block where diff --git a/semantic-tsx/src/Language/TSX/Tags.hs b/semantic-tsx/src/Language/TSX/Tags.hs index 00b75676f..358dfa4ad 100644 --- a/semantic-tsx/src/Language/TSX/Tags.hs +++ b/semantic-tsx/src/Language/TSX/Tags.hs @@ -10,6 +10,7 @@ module Language.TSX.Tags ) where import AST.Element +import AST.Token import Control.Effect.Reader import Control.Effect.Writer import Data.Foldable @@ -20,7 +21,6 @@ import Source.Loc import Source.Source as Source import Tags.Tag import qualified Tags.Tagging.Precise as Tags -import AST.Token class ToTags t where tags @@ -110,7 +110,7 @@ instance ToTags Tsx.Module where Prj Tsx.Identifier { text } -> yield text -- TODO: Handle NestedIdentifiers and Strings -- Prj Tsx.NestedIdentifier { extraChildren } -> match - _ -> gtags t + _ -> gtags t yield text = yieldTag text Module loc byteRange >> gtags t instance (ToTags l, ToTags r) => ToTags (l :+: r) where diff --git a/semantic-typescript/src/Language/TypeScript/Tags.hs b/semantic-typescript/src/Language/TypeScript/Tags.hs index 40713d684..85a8818f6 100644 --- a/semantic-typescript/src/Language/TypeScript/Tags.hs +++ b/semantic-typescript/src/Language/TypeScript/Tags.hs @@ -10,6 +10,7 @@ module Language.TypeScript.Tags ) where import AST.Element +import AST.Token import Control.Effect.Reader import Control.Effect.Writer import Data.Foldable @@ -20,7 +21,6 @@ import Source.Loc import Source.Source as Source import Tags.Tag import qualified Tags.Tagging.Precise as Tags -import AST.Token class ToTags t where tags @@ -103,7 +103,7 @@ instance ToTags Ts.Module where Prj Ts.Identifier { text } -> yield text -- TODO: Handle NestedIdentifiers and Strings -- Prj Tsx.NestedIdentifier { extraChildren } -> match - _ -> gtags t + _ -> gtags t yield text = yieldTag text Module loc byteRange >> gtags t instance (ToTags l, ToTags r) => ToTags (l :+: r) where