-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build error with the commit 23b6ed40288e36b5849d74c86a5cd0fa7548f043 #38
Comments
Sorry for the delay! What build tool are you using? |
I think I might be running into the same thing. I'm using GHCJS 8.4.1 and Stack with the most recent ( Stack config:
Building yields errors like:
Fixed diff --git a/src/Proto3/Wire/Encode.hs b/src/Proto3/Wire/Encode.hs
index 659c91f..26a0a87 100644
--- a/src/Proto3/Wire/Encode.hs
+++ b/src/Proto3/Wire/Encode.hs
@@ -108,7 +108,7 @@ import Proto3.Wire.Types
--
-- Use `toLazyByteString` when you're done assembling the `MessageBuilder`
newtype MessageBuilder = MessageBuilder { unMessageBuilder :: WB.Builder }
- deriving Monoid
+ deriving (Monoid, Semigroup)
instance Show MessageBuilder where
showsPrec prec builder = Fixed diff --git a/src/Proto3/Suite/DotProto/AST.hs b/src/Proto3/Suite/DotProto/AST.hs
index 82aabeb..e2fb82b 100644
--- a/src/Proto3/Suite/DotProto/AST.hs
+++ b/src/Proto3/Suite/DotProto/AST.hs
@@ -389,6 +389,8 @@ data DotProtoReservedField
| ReservedIdentifier String
deriving (Show, Eq)
+instance Arbitrary Natural
+
instance Arbitrary DotProtoReservedField where
arbitrary =
oneof [arbitrarySingleField, arbitraryFieldRange]
diff --git a/src/Proto3/Suite/DotProto/Rendering.hs b/src/Proto3/Suite/DotProto/Rendering.hs
index c1f05ec..583ce3b 100644
--- a/src/Proto3/Suite/DotProto/Rendering.hs
+++ b/src/Proto3/Suite/DotProto/Rendering.hs
@@ -17,6 +17,7 @@ module Proto3.Suite.DotProto.Rendering
, RenderingOptions(..)
) where
+import Prelude hiding ((<>))
import Data.Char
import qualified Data.Text as T
import Filesystem.Path.CurrentOS (toText)
diff --git a/src/Proto3/Suite/Types.hs b/src/Proto3/Suite/Types.hs
index c97db88..9269515 100644
--- a/src/Proto3/Suite/Types.hs
+++ b/src/Proto3/Suite/Types.hs
@@ -62,7 +62,7 @@ instance (Bounded a, Enum a) => Arbitrary (Enumerated a) where
-- the wire format.
newtype PackedVec a = PackedVec { packedvec :: V.Vector a }
deriving (Show, Eq, Functor, Foldable, Traversable, Ord, NFData, Applicative,
- Alternative, Monoid)
+ Alternative, Monoid, Semigroup)
instance IsList (PackedVec a) where
type Item (PackedVec a) = a
@@ -74,7 +74,7 @@ instance Arbitrary a => Arbitrary (PackedVec a) where
newtype UnpackedVec a = UnpackedVec {unpackedvec :: V.Vector a }
deriving (Show, Eq, Functor, Foldable, Traversable, Ord, NFData, Applicative,
- Alternative, Monoid)
+ Alternative, Monoid, Semigroup)
instance IsList (UnpackedVec a) where
type Item (UnpackedVec a) = a
@@ -87,7 +87,7 @@ instance Arbitrary a => Arbitrary (UnpackedVec a) where
newtype NestedVec a =
NestedVec { nestedvec :: V.Vector a }
deriving (Show, Eq, Functor, Foldable, Traversable, Ord, NFData, Applicative,
- Alternative, Monoid)
+ Alternative, Monoid, Semigroup)
instance IsList (NestedVec a) where
type Item (NestedVec a) = a
@@ -99,19 +99,20 @@ instance Arbitrary a => Arbitrary (NestedVec a) where
-- | 'Nested' provides a way to nest protobuf messages within protobuf messages.
newtype Nested a = Nested { nested :: Maybe a }
- deriving (Show, Eq, Ord, Generic, NFData, Monoid, Arbitrary, Functor, Foldable,
- Traversable, Applicative, Alternative, Monad)
+ deriving (Show, Eq, Ord, Generic, NFData, Monoid, Semigroup, Arbitrary, Functor,
+ Foldable, Traversable, Applicative, Alternative, Monad)
-- | 'ForceEmit' provides a way to force emission of field values, even when
-- default-value semantics states otherwise. Used when serializing oneof
-- subfields.
newtype ForceEmit a = ForceEmit{ forceEmit :: a }
- deriving (Show, Eq, Ord, Generic, NFData, Monoid, Arbitrary, Functor, Foldable,
- Traversable)
+ deriving (Show, Eq, Ord, Generic, NFData, Monoid, Semigroup, Arbitrary, Functor,
+ Foldable, Traversable)
-- | 'Commented' provides a way to add comments to generated @.proto@ files.
newtype Commented (comment :: Symbol) a = Commented { unCommented :: a }
- deriving (Show, Eq, Ord, Generic, NFData, Monoid, Arbitrary, Functor, Foldable, Traversable)
+ deriving (Show, Eq, Ord, Generic, NFData, Monoid, Semigroup, Arbitrary, Functor,
+ Foldable, Traversable)
-- | A type operator synonym for 'Commented', so that we can write C-style
-- comments on fields. Also, FWIW, these upper bounds can probably be raised:
|
I use the recently commit to build grpc demo and failed. the error is
The text was updated successfully, but these errors were encountered: