mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +03:00
hlint
This commit is contained in:
parent
13eecb41a5
commit
002cb36cb3
@ -148,7 +148,7 @@ instance Message1 [] where
|
|||||||
-- oneMsg = decodeMessage (fieldNumber 1)
|
-- oneMsg = decodeMessage (fieldNumber 1)
|
||||||
-- liftDotProto (_ :: Proxy [a]) = messageField (NestedRepeated (Named (Single (nameOf (Proxy @a))))) Nothing
|
-- liftDotProto (_ :: Proxy [a]) = messageField (NestedRepeated (Named (Single (nameOf (Proxy @a))))) Nothing
|
||||||
liftDotProto (_ :: Proxy [a]) = [ Proto.DotProtoMessageField $ Proto.DotProtoField (fieldNumber 1) ty (Proto.Single "listContent") [] Nothing ]
|
liftDotProto (_ :: Proxy [a]) = [ Proto.DotProtoMessageField $ Proto.DotProtoField (fieldNumber 1) ty (Proto.Single "listContent") [] Nothing ]
|
||||||
where ty = (Proto.NestedRepeated (Proto.Named (Proto.Single (nameOf (Proxy @a)))))
|
where ty = Proto.NestedRepeated (Proto.Named (Proto.Single (nameOf (Proxy @a))))
|
||||||
|
|
||||||
|
|
||||||
-- Common
|
-- Common
|
||||||
|
@ -176,7 +176,7 @@ instance Evaluatable Power where
|
|||||||
eval t = rvalBox =<< (traverse subtermValue t >>= go) where
|
eval t = rvalBox =<< (traverse subtermValue t >>= go) where
|
||||||
go (Power a b) = liftNumeric2 liftedExponent a b
|
go (Power a b) = liftNumeric2 liftedExponent a b
|
||||||
|
|
||||||
data Negate a = Negate { term :: a }
|
newtype Negate a = Negate { term :: a }
|
||||||
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable, Named1, Message1)
|
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable, Named1, Message1)
|
||||||
|
|
||||||
instance Eq1 Negate where liftEq = genericLiftEq
|
instance Eq1 Negate where liftEq = genericLiftEq
|
||||||
@ -240,7 +240,7 @@ instance Evaluatable And where
|
|||||||
cond <- a
|
cond <- a
|
||||||
ifthenelse cond b (pure cond)
|
ifthenelse cond b (pure cond)
|
||||||
|
|
||||||
data Not a = Not { term :: a }
|
newtype Not a = Not { term :: a }
|
||||||
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable, Named1, Message1)
|
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable, Named1, Message1)
|
||||||
|
|
||||||
instance Eq1 Not where liftEq = genericLiftEq
|
instance Eq1 Not where liftEq = genericLiftEq
|
||||||
|
@ -83,9 +83,9 @@ instance (Show1 f, Show a) => Show (Term f a) where
|
|||||||
showsPrec = showsPrec1
|
showsPrec = showsPrec1
|
||||||
|
|
||||||
instance Message1 f => Message (Term f ()) where
|
instance Message1 f => Message (Term f ()) where
|
||||||
encodeMessage num (Term (In _ f)) = Encode.embedded num (liftEncodeMessage encodeMessage (fromInteger 1) f)
|
encodeMessage num (Term (In _ f)) = Encode.embedded num (liftEncodeMessage encodeMessage 1 f)
|
||||||
decodeMessage num = termIn () . fromMaybe undefined <$> Decode.at (Decode.embedded (liftDecodeMessage decodeMessage (fromInteger 1))) num
|
decodeMessage num = termIn () . fromMaybe undefined <$> Decode.at (Decode.embedded (liftDecodeMessage decodeMessage 1)) num
|
||||||
dotProto _ = [ DotProtoMessageField (DotProtoField (fromInteger 1) (Prim (Named (Single "Syntax"))) (Single "syntax") [] Nothing) ]
|
dotProto _ = [ DotProtoMessageField (DotProtoField 1 (Prim (Named (Single "Syntax"))) (Single "syntax") [] Nothing) ]
|
||||||
|
|
||||||
instance Named (Term f a) where
|
instance Named (Term f a) where
|
||||||
nameOf _ = "Term"
|
nameOf _ = "Term"
|
||||||
|
Loading…
Reference in New Issue
Block a user