1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Always with the lints

This commit is contained in:
Timothy Clem 2018-09-10 17:32:58 -07:00
parent 8096bfc8f7
commit b985b15552
2 changed files with 3 additions and 7 deletions

View File

@ -11,12 +11,9 @@ module Data.Graph.DiffVertex
, TermAnnotation(..)
) where
import Prologue
import Data.Graph
import Data.Graph.TermVertex
import Data.Aeson
import Data.Range
import Data.Span
import Data.JSON.Fields
import qualified Data.Text as T

View File

@ -8,7 +8,6 @@ import Diffing.Algorithm
import Prologue hiding (Text)
import Proto3.Suite
import qualified Proto3.Suite as PB
import qualified Proto3.Wire.Encode as Encode
newtype Document a = Document { values :: [a] }
deriving (Eq, Ord, Show, Foldable, Traversable, Functor, Generic1, Hashable1, Diffable, ToJSONFields1, Named1, Message1)
@ -118,7 +117,7 @@ data Link a = Link { linkURL :: T.Text, linkTitle :: Maybe T.Text }
deriving (Eq, Ord, Show, Foldable, Traversable, Functor, Generic1, Hashable1, Diffable, ToJSONFields1, Named1)
instance Message1 Link where
liftEncodeMessage _ num Link{..} = encodeMessageField 1 linkURL <> maybe mempty (encodeMessageField 2) linkTitle
liftEncodeMessage _ _ Link{..} = encodeMessageField 1 linkURL <> maybe mempty (encodeMessageField 2) linkTitle
liftDecodeMessage = undefined
liftDotProto _ =
[ DotProtoMessageField $ DotProtoField 1 (Prim PB.String) (Single "linkUrl") [] Nothing
@ -133,7 +132,7 @@ data Image a = Image { imageURL :: T.Text, imageTitle :: Maybe T.Text }
deriving (Eq, Ord, Show, Foldable, Traversable, Functor, Generic1, Hashable1, Diffable, ToJSONFields1, Named1)
instance Message1 Image where
liftEncodeMessage _ num Image{..} = encodeMessageField 1 imageURL <> maybe mempty (encodeMessageField 2) imageTitle
liftEncodeMessage _ _ Image{..} = encodeMessageField 1 imageURL <> maybe mempty (encodeMessageField 2) imageTitle
liftDecodeMessage = undefined
liftDotProto _ =
[ DotProtoMessageField $ DotProtoField 1 (Prim PB.String) (Single "imageURL") [] Nothing
@ -148,7 +147,7 @@ data Code a = Code { codeLanguage :: Maybe T.Text, codeContent :: T.Text }
deriving (Eq, Ord, Show, Foldable, Traversable, Functor, Generic1, Hashable1, Diffable, ToJSONFields1, Named1)
instance Message1 Code where
liftEncodeMessage _ num Code{..} = maybe mempty (encodeMessageField 1) codeLanguage <> encodeMessageField 2 codeContent
liftEncodeMessage _ _ Code{..} = maybe mempty (encodeMessageField 1) codeLanguage <> encodeMessageField 2 codeContent
liftDecodeMessage = undefined
liftDotProto _ =
[ DotProtoMessageField $ DotProtoField 1 (Prim PB.String) (Single "codeLanguage") [] Nothing