From 1c5d8d816e7b51e280b76bfed689054686ffd2c5 Mon Sep 17 00:00:00 2001 From: joshvera Date: Thu, 31 May 2018 11:38:45 -0400 Subject: [PATCH] lints --- src/Data/Span.hs | 2 +- src/Data/Syntax.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/Span.hs b/src/Data/Span.hs index 37749d2c8..1f805060d 100644 --- a/src/Data/Span.hs +++ b/src/Data/Span.hs @@ -28,7 +28,7 @@ data Pos = Pos deriving (Show, Read, Eq, Ord, Generic, Hashable, Named, Message) instance MessageField Pos where - encodeMessageField num = (Encode.embedded num . encodeMessage (fieldNumber 1)) + encodeMessageField num = Encode.embedded num . encodeMessage (fieldNumber 1) decodeMessageField = fromMaybe def <$> Decode.embedded (decodeMessage (fieldNumber 1)) protoType pr = messageField (Prim $ Named (Single (nameOf pr))) Nothing diff --git a/src/Data/Syntax.hs b/src/Data/Syntax.hs index d933c0188..9930653bd 100644 --- a/src/Data/Syntax.hs +++ b/src/Data/Syntax.hs @@ -104,7 +104,7 @@ infixContext :: (Context :< fs, Assignment.Parsing m, Semigroup a, HasCallStack, infixContext context left right operators = uncurry (&) <$> postContextualizeThrough context left (asum operators) <*> postContextualize context right instance (Apply Message1 fs, Generate Message1 fs fs, Generate Named1 fs fs) => Message1 (Sum fs) where - liftEncodeMessage encodeMessage num fs = apply @Message1 (liftEncodeMessage encodeMessage num) fs + liftEncodeMessage encodeMessage num = apply @Message1 (liftEncodeMessage encodeMessage num) liftDecodeMessage decodeMessage _ = oneof undefined listOfParsers where listOfParsers = @@ -127,7 +127,7 @@ instance Generate c all '[] where generate _ = mempty instance (Element f all, c f, Generate c all fs) => Generate c all (f ': fs) where - generate each = (each (Proxy @f) (natVal (Proxy @(ElemIndex f all)))) `mappend` generate @c @all @fs each + generate each = each (Proxy @f) (natVal (Proxy @(ElemIndex f all))) `mappend` generate @c @all @fs each -- Common