Skip to content

Commit

Permalink
Add kind signature to GenericMessage type parameter for successful …
Browse files Browse the repository at this point in the history
…compilation under ghc 8.2 (awakesecurity#17)
  • Loading branch information
intractable authored Jun 7, 2017
1 parent 10f592c commit 78fed3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Proto3/Suite/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ message pr = DotProtoMessage (Single $ nameOf pr) $ DotProtoMessageField <$> (do

-- * Generic Instances

class GenericMessage f where
class GenericMessage (f :: * -> *) where
type GenericFieldCount f :: Nat

genericEncodeMessage :: FieldNumber -> f a -> Encode.MessageBuilder
Expand Down Expand Up @@ -580,7 +580,7 @@ instance MessageField c => GenericMessage (K1 i c) where
genericDotProto _ = [protoType (Proxy :: Proxy c)]

instance (Selector s, GenericMessage f) => GenericMessage (M1 S s f) where
type GenericFieldCount (M1 S t f) = GenericFieldCount f
type GenericFieldCount (M1 S s f) = GenericFieldCount f
genericEncodeMessage num (M1 x) = genericEncodeMessage num x
genericDecodeMessage num = fmap M1 $ genericDecodeMessage num
genericDotProto _ = map applyName $ genericDotProto (Proxy :: Proxy f)
Expand Down

0 comments on commit 78fed3e

Please sign in to comment.