protocol-buffers-descriptor 0.3.1 → 1.0.0
raw patch · 26 files changed
+1244/−589 lines, 26 filesdep −QuickCheckdep −arraydep −directorydep ~protocol-buffersPVP ok
version bump matches the API change (PVP)
Dependencies removed: QuickCheck, array, directory, filepath, mtl
Dependency ranges changed: protocol-buffers
API changes (from Hackage documentation)
+ Text.DescriptorProtos.EnumOptions: ext'field :: EnumOptions -> ExtField
+ Text.DescriptorProtos.EnumOptions: instance ExtendMessage EnumOptions
+ Text.DescriptorProtos.EnumOptions: uninterpreted_option :: EnumOptions -> Seq UninterpretedOption
+ Text.DescriptorProtos.EnumValueOptions: ext'field :: EnumValueOptions -> ExtField
+ Text.DescriptorProtos.EnumValueOptions: instance ExtendMessage EnumValueOptions
+ Text.DescriptorProtos.EnumValueOptions: uninterpreted_option :: EnumValueOptions -> Seq UninterpretedOption
+ Text.DescriptorProtos.FieldOptions: ext'field :: FieldOptions -> ExtField
+ Text.DescriptorProtos.FieldOptions: instance ExtendMessage FieldOptions
+ Text.DescriptorProtos.FieldOptions: uninterpreted_option :: FieldOptions -> Seq UninterpretedOption
+ Text.DescriptorProtos.FileDescriptorSet: FileDescriptorSet :: Seq FileDescriptorProto -> UnknownField -> FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: data FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: file :: FileDescriptorSet -> Seq FileDescriptorProto
+ Text.DescriptorProtos.FileDescriptorSet: instance Default FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance Eq FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance GPB FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance Mergeable FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance MessageAPI msg' (msg' -> FileDescriptorSet) FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance Ord FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance ReflectDescriptor FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance Show FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance Typeable FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance UnknownMessage FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: instance Wire FileDescriptorSet
+ Text.DescriptorProtos.FileDescriptorSet: unknown'field :: FileDescriptorSet -> UnknownField
+ Text.DescriptorProtos.FileOptions: ext'field :: FileOptions -> ExtField
+ Text.DescriptorProtos.FileOptions: instance ExtendMessage FileOptions
+ Text.DescriptorProtos.FileOptions: uninterpreted_option :: FileOptions -> Seq UninterpretedOption
+ Text.DescriptorProtos.MessageOptions: ext'field :: MessageOptions -> ExtField
+ Text.DescriptorProtos.MessageOptions: instance ExtendMessage MessageOptions
+ Text.DescriptorProtos.MessageOptions: uninterpreted_option :: MessageOptions -> Seq UninterpretedOption
+ Text.DescriptorProtos.MethodOptions: ext'field :: MethodOptions -> ExtField
+ Text.DescriptorProtos.MethodOptions: instance ExtendMessage MethodOptions
+ Text.DescriptorProtos.MethodOptions: uninterpreted_option :: MethodOptions -> Seq UninterpretedOption
+ Text.DescriptorProtos.Options: class DescendClass a c
+ Text.DescriptorProtos.Options: class DescendKey a
+ Text.DescriptorProtos.Options: class NameAndOptions a opt | a -> opt, opt -> a
+ Text.DescriptorProtos.Options: data DescriptorProto
+ Text.DescriptorProtos.Options: data EnumDescriptorProto
+ Text.DescriptorProtos.Options: data EnumOptions
+ Text.DescriptorProtos.Options: data EnumValueDescriptorProto
+ Text.DescriptorProtos.Options: data EnumValueOptions
+ Text.DescriptorProtos.Options: data FieldDescriptorProto
+ Text.DescriptorProtos.Options: data FieldOptions
+ Text.DescriptorProtos.Options: data FileDescriptorProto
+ Text.DescriptorProtos.Options: data FileOptions
+ Text.DescriptorProtos.Options: data MessageOptions
+ Text.DescriptorProtos.Options: data MethodDescriptorProto
+ Text.DescriptorProtos.Options: data MethodOptions
+ Text.DescriptorProtos.Options: data ServiceDescriptorProto
+ Text.DescriptorProtos.Options: data ServiceOptions
+ Text.DescriptorProtos.Options: descend :: (DescendClass a c) => String -> a -> Maybe c
+ Text.DescriptorProtos.Options: descend' :: (DescendClass a c) => a -> Utf8 -> (Maybe c)
+ Text.DescriptorProtos.Options: descendKey :: (DescendKey a) => String -> a -> Maybe FieldDescriptorProto
+ Text.DescriptorProtos.Options: descendKey' :: (DescendKey a) => a -> Utf8 -> Maybe FieldDescriptorProto
+ Text.DescriptorProtos.Options: instance DescendClass DescriptorProto DescriptorProto
+ Text.DescriptorProtos.Options: instance DescendClass DescriptorProto EnumDescriptorProto
+ Text.DescriptorProtos.Options: instance DescendClass DescriptorProto FieldDescriptorProto
+ Text.DescriptorProtos.Options: instance DescendClass EnumDescriptorProto EnumValueDescriptorProto
+ Text.DescriptorProtos.Options: instance DescendClass FileDescriptorProto DescriptorProto
+ Text.DescriptorProtos.Options: instance DescendClass FileDescriptorProto EnumDescriptorProto
+ Text.DescriptorProtos.Options: instance DescendClass FileDescriptorProto ServiceDescriptorProto
+ Text.DescriptorProtos.Options: instance DescendClass ServiceDescriptorProto MethodDescriptorProto
+ Text.DescriptorProtos.Options: instance DescendKey DescriptorProto
+ Text.DescriptorProtos.Options: instance DescendKey FileDescriptorProto
+ Text.DescriptorProtos.Options: instance NameAndOptions DescriptorProto MessageOptions
+ Text.DescriptorProtos.Options: instance NameAndOptions EnumDescriptorProto EnumOptions
+ Text.DescriptorProtos.Options: instance NameAndOptions EnumValueDescriptorProto EnumValueOptions
+ Text.DescriptorProtos.Options: instance NameAndOptions FieldDescriptorProto FieldOptions
+ Text.DescriptorProtos.Options: instance NameAndOptions FileDescriptorProto FileOptions
+ Text.DescriptorProtos.Options: instance NameAndOptions MethodDescriptorProto MethodOptions
+ Text.DescriptorProtos.Options: instance NameAndOptions ServiceDescriptorProto ServiceOptions
+ Text.DescriptorProtos.Options: name :: (NameAndOptions a opt) => a -> Utf8
+ Text.DescriptorProtos.Options: options :: (NameAndOptions a opt) => a -> opt
+ Text.DescriptorProtos.Options: toDP :: (DescendClass a DescriptorProto) => String -> a -> Maybe DescriptorProto
+ Text.DescriptorProtos.Options: toEP :: (DescendClass a EnumDescriptorProto) => String -> a -> Maybe EnumDescriptorProto
+ Text.DescriptorProtos.Options: toEVP :: String -> EnumDescriptorProto -> Maybe EnumValueDescriptorProto
+ Text.DescriptorProtos.Options: toFP :: String -> DescriptorProto -> Maybe FieldDescriptorProto
+ Text.DescriptorProtos.Options: toMP :: String -> ServiceDescriptorProto -> Maybe MethodDescriptorProto
+ Text.DescriptorProtos.Options: toSP :: String -> FileDescriptorProto -> Maybe ServiceDescriptorProto
+ Text.DescriptorProtos.ServiceOptions: ext'field :: ServiceOptions -> ExtField
+ Text.DescriptorProtos.ServiceOptions: instance ExtendMessage ServiceOptions
+ Text.DescriptorProtos.ServiceOptions: uninterpreted_option :: ServiceOptions -> Seq UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: UninterpretedOption :: Seq NamePart -> Maybe Utf8 -> Maybe Word64 -> Maybe Int64 -> Maybe Double -> Maybe ByteString -> UnknownField -> UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: data UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: double_value :: UninterpretedOption -> Maybe Double
+ Text.DescriptorProtos.UninterpretedOption: identifier_value :: UninterpretedOption -> Maybe Utf8
+ Text.DescriptorProtos.UninterpretedOption: instance Default UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance Eq UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance GPB UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance Mergeable UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance MessageAPI msg' (msg' -> UninterpretedOption) UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance Ord UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance ReflectDescriptor UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance Show UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance Typeable UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance UnknownMessage UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: instance Wire UninterpretedOption
+ Text.DescriptorProtos.UninterpretedOption: name :: UninterpretedOption -> Seq NamePart
+ Text.DescriptorProtos.UninterpretedOption: negative_int_value :: UninterpretedOption -> Maybe Int64
+ Text.DescriptorProtos.UninterpretedOption: positive_int_value :: UninterpretedOption -> Maybe Word64
+ Text.DescriptorProtos.UninterpretedOption: string_value :: UninterpretedOption -> Maybe ByteString
+ Text.DescriptorProtos.UninterpretedOption: unknown'field :: UninterpretedOption -> UnknownField
+ Text.DescriptorProtos.UninterpretedOption.NamePart: NamePart :: Utf8 -> Bool -> UnknownField -> NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: data NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance Default NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance Eq NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance GPB NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance Mergeable NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance MessageAPI msg' (msg' -> NamePart) NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance Ord NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance ReflectDescriptor NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance Show NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance Typeable NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance UnknownMessage NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: instance Wire NamePart
+ Text.DescriptorProtos.UninterpretedOption.NamePart: is_extension :: NamePart -> Bool
+ Text.DescriptorProtos.UninterpretedOption.NamePart: name_part :: NamePart -> Utf8
+ Text.DescriptorProtos.UninterpretedOption.NamePart: unknown'field :: NamePart -> UnknownField
- Text.DescriptorProtos.EnumOptions: EnumOptions :: UnknownField -> EnumOptions
+ Text.DescriptorProtos.EnumOptions: EnumOptions :: Seq UninterpretedOption -> ExtField -> UnknownField -> EnumOptions
- Text.DescriptorProtos.EnumValueOptions: EnumValueOptions :: UnknownField -> EnumValueOptions
+ Text.DescriptorProtos.EnumValueOptions: EnumValueOptions :: Seq UninterpretedOption -> ExtField -> UnknownField -> EnumValueOptions
- Text.DescriptorProtos.FieldOptions: FieldOptions :: Maybe CType -> Maybe Utf8 -> UnknownField -> FieldOptions
+ Text.DescriptorProtos.FieldOptions: FieldOptions :: Maybe CType -> Maybe Utf8 -> Seq UninterpretedOption -> ExtField -> UnknownField -> FieldOptions
- Text.DescriptorProtos.FileOptions: FileOptions :: Maybe Utf8 -> Maybe Utf8 -> Maybe Bool -> Maybe OptimizeMode -> UnknownField -> FileOptions
+ Text.DescriptorProtos.FileOptions: FileOptions :: Maybe Utf8 -> Maybe Utf8 -> Maybe Bool -> Maybe OptimizeMode -> Seq UninterpretedOption -> ExtField -> UnknownField -> FileOptions
- Text.DescriptorProtos.MessageOptions: MessageOptions :: Maybe Bool -> UnknownField -> MessageOptions
+ Text.DescriptorProtos.MessageOptions: MessageOptions :: Maybe Bool -> Seq UninterpretedOption -> ExtField -> UnknownField -> MessageOptions
- Text.DescriptorProtos.MethodOptions: MethodOptions :: UnknownField -> MethodOptions
+ Text.DescriptorProtos.MethodOptions: MethodOptions :: Seq UninterpretedOption -> ExtField -> UnknownField -> MethodOptions
- Text.DescriptorProtos.ServiceOptions: ServiceOptions :: UnknownField -> ServiceOptions
+ Text.DescriptorProtos.ServiceOptions: ServiceOptions :: Seq UninterpretedOption -> ExtField -> UnknownField -> ServiceOptions
Files
- Text/DescriptorProtos.hs +5/−5
- Text/DescriptorProtos/DescriptorProto.hs +49/−52
- Text/DescriptorProtos/DescriptorProto/ExtensionRange.hs +26/−26
- Text/DescriptorProtos/EnumDescriptorProto.hs +28/−29
- Text/DescriptorProtos/EnumOptions.hs +48/−29
- Text/DescriptorProtos/EnumValueDescriptorProto.hs +28/−29
- Text/DescriptorProtos/EnumValueOptions.hs +48/−29
- Text/DescriptorProtos/FieldDescriptorProto.hs +56/−57
- Text/DescriptorProtos/FieldDescriptorProto/Label.hs +6/−4
- Text/DescriptorProtos/FieldDescriptorProto/Type.hs +14/−12
- Text/DescriptorProtos/FieldOptions.hs +54/−33
- Text/DescriptorProtos/FieldOptions/CType.hs +3/−3
- Text/DescriptorProtos/FileDescriptorProto.hs +56/−57
- Text/DescriptorProtos/FileDescriptorSet.hs +62/−0
- Text/DescriptorProtos/FileOptions.hs +65/−40
- Text/DescriptorProtos/FileOptions/OptimizeMode.hs +4/−3
- Text/DescriptorProtos/MessageOptions.hs +51/−31
- Text/DescriptorProtos/MethodDescriptorProto.hs +33/−34
- Text/DescriptorProtos/MethodOptions.hs +48/−29
- Text/DescriptorProtos/Options.hs +207/−0
- Text/DescriptorProtos/ServiceDescriptorProto.hs +28/−29
- Text/DescriptorProtos/ServiceOptions.hs +48/−29
- Text/DescriptorProtos/UninterpretedOption.hs +84/−0
- Text/DescriptorProtos/UninterpretedOption/NamePart.hs +63/−0
- descriptor.proto +117/−11
- protocol-buffers-descriptor.cabal +13/−18
Text/DescriptorProtos.hs view
@@ -8,11 +8,11 @@ protoInfo :: ProtoInfo protoInfo- = P'.read- "ProtoInfo {protoMod = ProtoName {haskellPrefix = \"Text\", parentModule = \"\", baseName = \"DescriptorProtos\"}, protoFilePath = [\"Text\",\"DescriptorProtos.hs\"], protoSource = \"/Users/chrisk/Documents/projects/haskell/develop/protocol-buffers/descriptor/tmp/../descriptor.proto\", extensionKeys = fromList [], messages = [DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FileDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"package\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"dependency\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"message_type\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"DescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"enum_type\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"service\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"ServiceDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"extension\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FileOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"DescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"DescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"field\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"extension\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"nested_type\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"DescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"enum_type\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"extension_range\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"ExtensionRange\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MessageOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"ExtensionRange\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"DescriptorProto\",\"ExtensionRange.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto.ExtensionRange\", baseName = \"start\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto.ExtensionRange\", baseName = \"end\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FieldDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"number\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"label\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"Label\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"type'\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"Type\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"type_name\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"extendee\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"default_value\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumDescriptorProto\", baseName = \"value\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumValueDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumValueDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumValueDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumValueDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumValueDescriptorProto\", baseName = \"number\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumValueDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumValueOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"ServiceDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"ServiceDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.ServiceDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.ServiceDescriptorProto\", baseName = \"method\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MethodDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.ServiceDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"ServiceOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MethodDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MethodDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MethodDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MethodDescriptorProto\", baseName = \"input_type\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MethodDescriptorProto\", baseName = \"output_type\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MethodDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MethodOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FileOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"java_package\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"java_outer_classname\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"java_multiple_files\"}, fieldNumber = FieldId {getFieldId = 10}, wireTag = WireTag {getWireTag = 80}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just (Chunk \"false\" Empty), hsDefault = Just (HsDef'Bool False)},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"optimize_for\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 72}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"OptimizeMode\"}), hsRawDefault = Just (Chunk \"CODE_SIZE\" Empty), hsDefault = Just (HsDef'Enum \"CODE_SIZE\")}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MessageOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MessageOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MessageOptions\", baseName = \"message_set_wire_format\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just (Chunk \"false\" Empty), hsDefault = Just (HsDef'Bool False)}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FieldOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldOptions\", baseName = \"ctype\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldOptions\", baseName = \"CType\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldOptions\", baseName = \"experimental_map_key\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 74}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumOptions.hs\"], isGroup = False, fields = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumValueOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumValueOptions.hs\"], isGroup = False, fields = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"ServiceOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"ServiceOptions.hs\"], isGroup = False, fields = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MethodOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MethodOptions.hs\"], isGroup = False, fields = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}], enums = [EnumInfo {enumName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"Type\"}, enumFilePath = [\"Text\",\"DescriptorProtos\",\"FieldDescriptorProto\",\"Type.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"TYPE_DOUBLE\"),(EnumCode {getEnumCode = 2},\"TYPE_FLOAT\"),(EnumCode {getEnumCode = 3},\"TYPE_INT64\"),(EnumCode {getEnumCode = 4},\"TYPE_UINT64\"),(EnumCode {getEnumCode = 5},\"TYPE_INT32\"),(EnumCode {getEnumCode = 6},\"TYPE_FIXED64\"),(EnumCode {getEnumCode = 7},\"TYPE_FIXED32\"),(EnumCode {getEnumCode = 8},\"TYPE_BOOL\"),(EnumCode {getEnumCode = 9},\"TYPE_STRING\"),(EnumCode {getEnumCode = 10},\"TYPE_GROUP\"),(EnumCode {getEnumCode = 11},\"TYPE_MESSAGE\"),(EnumCode {getEnumCode = 12},\"TYPE_BYTES\"),(EnumCode {getEnumCode = 13},\"TYPE_UINT32\"),(EnumCode {getEnumCode = 14},\"TYPE_ENUM\"),(EnumCode {getEnumCode = 15},\"TYPE_SFIXED32\"),(EnumCode {getEnumCode = 16},\"TYPE_SFIXED64\"),(EnumCode {getEnumCode = 17},\"TYPE_SINT32\"),(EnumCode {getEnumCode = 18},\"TYPE_SINT64\")]},EnumInfo {enumName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"Label\"}, enumFilePath = [\"Text\",\"DescriptorProtos\",\"FieldDescriptorProto\",\"Label.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"LABEL_OPTIONAL\"),(EnumCode {getEnumCode = 2},\"LABEL_REQUIRED\"),(EnumCode {getEnumCode = 3},\"LABEL_REPEATED\")]},EnumInfo {enumName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"OptimizeMode\"}, enumFilePath = [\"Text\",\"DescriptorProtos\",\"FileOptions\",\"OptimizeMode.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"SPEED\"),(EnumCode {getEnumCode = 2},\"CODE_SIZE\")]},EnumInfo {enumName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldOptions\", baseName = \"CType\"}, enumFilePath = [\"Text\",\"DescriptorProtos\",\"FieldOptions\",\"CType.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"CORD\"),(EnumCode {getEnumCode = 2},\"STRING_PIECE\")]}], knownKeyMap = fromList []}"+ = P'.read+ "ProtoInfo {protoMod = ProtoName {protobufName = FIName \".google.protobuf\", haskellPrefix = [MName \"Text\"], parentModule = [], baseName = MName \"DescriptorProtos\"}, protoFilePath = [\"Text\",\"DescriptorProtos.hs\"], protoSource = \"descriptor.proto\", extensionKeys = fromList [], messages = [DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FileDescriptorSet\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileDescriptorSet\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileDescriptorSet.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorSet.file\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorSet\"], baseName' = FName \"file\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FileDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FileDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.package\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"package\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.dependency\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"dependency\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.message_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"message_type\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"DescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.enum_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"enum_type\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.service\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"service\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.ServiceDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"ServiceDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.extension\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"extension\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FileOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"DescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"DescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.field\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"field\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.extension\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"extension\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.nested_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"nested_type\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"DescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.enum_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"enum_type\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.extension_range\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"extension_range\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto.ExtensionRange\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName = MName \"ExtensionRange\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.MessageOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MessageOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto.ExtensionRange\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName = MName \"ExtensionRange\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"DescriptorProto\",\"ExtensionRange.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.ExtensionRange.start\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\",MName \"ExtensionRange\"], baseName' = FName \"start\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.ExtensionRange.end\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\",MName \"ExtensionRange\"], baseName' = FName \"end\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FieldDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.number\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"number\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.label\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"label\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto.Label\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName = MName \"Label\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"type'\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto.Type\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName = MName \"Type\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.type_name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"type_name\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.extendee\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"extendee\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.default_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"default_value\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"value\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumValueDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumValueDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumValueDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumValueDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumValueDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumValueDescriptorProto.number\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumValueDescriptorProto\"], baseName' = FName \"number\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumValueDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumValueDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumValueOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.ServiceDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"ServiceDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"ServiceDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.ServiceDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"ServiceDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.ServiceDescriptorProto.method\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"ServiceDescriptorProto\"], baseName' = FName \"method\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.MethodDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MethodDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.ServiceDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"ServiceDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.ServiceOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"ServiceOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.MethodDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MethodDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MethodDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodDescriptorProto.input_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodDescriptorProto\"], baseName' = FName \"input_type\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodDescriptorProto.output_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodDescriptorProto\"], baseName' = FName \"output_type\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.MethodOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MethodOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FileOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.java_package\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"java_package\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.java_outer_classname\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"java_outer_classname\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.java_multiple_files\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"java_multiple_files\"}, fieldNumber = FieldId {getFieldId = 10}, wireTag = WireTag {getWireTag = 80}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just (Chunk \"false\" Empty), hsDefault = Just (HsDef'Bool False)},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.optimize_for\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"optimize_for\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 72}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FileOptions.OptimizeMode\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName = MName \"OptimizeMode\"}), hsRawDefault = Just (Chunk \"CODE_SIZE\" Empty), hsDefault = Just (HsDef'Enum \"CODE_SIZE\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.MessageOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MessageOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MessageOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MessageOptions.message_set_wire_format\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MessageOptions\"], baseName' = FName \"message_set_wire_format\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just (Chunk \"false\" Empty), hsDefault = Just (HsDef'Bool False)},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MessageOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MessageOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FieldOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FieldOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldOptions.ctype\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName' = FName \"ctype\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldOptions.CType\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName = MName \"CType\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldOptions.experimental_map_key\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName' = FName \"experimental_map_key\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 74}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumValueOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumValueOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumValueOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumValueOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.ServiceOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"ServiceOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"ServiceOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.ServiceOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"ServiceOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.MethodOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MethodOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MethodOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"UninterpretedOption.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption.NamePart\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName = MName \"NamePart\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.identifier_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"identifier_value\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.positive_int_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"positive_int_value\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.negative_int_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"negative_int_value\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 3}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.double_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"double_value\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 49}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 1}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.string_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"string_value\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True},DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption.NamePart\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName = MName \"NamePart\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"UninterpretedOption\",\"NamePart.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.NamePart.name_part\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\",MName \"NamePart\"], baseName' = FName \"name_part\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = True, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.NamePart.is_extension\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\",MName \"NamePart\"], baseName' = FName \"is_extension\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = True, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}], enums = [EnumInfo {enumName = ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto.Type\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName = MName \"Type\"}, enumFilePath = [\"Text\",\"DescriptorProtos\",\"FieldDescriptorProto\",\"Type.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"TYPE_DOUBLE\"),(EnumCode {getEnumCode = 2},\"TYPE_FLOAT\"),(EnumCode {getEnumCode = 3},\"TYPE_INT64\"),(EnumCode {getEnumCode = 4},\"TYPE_UINT64\"),(EnumCode {getEnumCode = 5},\"TYPE_INT32\"),(EnumCode {getEnumCode = 6},\"TYPE_FIXED64\"),(EnumCode {getEnumCode = 7},\"TYPE_FIXED32\"),(EnumCode {getEnumCode = 8},\"TYPE_BOOL\"),(EnumCode {getEnumCode = 9},\"TYPE_STRING\"),(EnumCode {getEnumCode = 10},\"TYPE_GROUP\"),(EnumCode {getEnumCode = 11},\"TYPE_MESSAGE\"),(EnumCode {getEnumCode = 12},\"TYPE_BYTES\"),(EnumCode {getEnumCode = 13},\"TYPE_UINT32\"),(EnumCode {getEnumCode = 14},\"TYPE_ENUM\"),(EnumCode {getEnumCode = 15},\"TYPE_SFIXED32\"),(EnumCode {getEnumCode = 16},\"TYPE_SFIXED64\"),(EnumCode {getEnumCode = 17},\"TYPE_SINT32\"),(EnumCode {getEnumCode = 18},\"TYPE_SINT64\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto.Label\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName = MName \"Label\"}, enumFilePath = [\"Text\",\"DescriptorProtos\",\"FieldDescriptorProto\",\"Label.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"LABEL_OPTIONAL\"),(EnumCode {getEnumCode = 2},\"LABEL_REQUIRED\"),(EnumCode {getEnumCode = 3},\"LABEL_REPEATED\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".google.protobuf.FileOptions.OptimizeMode\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName = MName \"OptimizeMode\"}, enumFilePath = [\"Text\",\"DescriptorProtos\",\"FileOptions\",\"OptimizeMode.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"SPEED\"),(EnumCode {getEnumCode = 2},\"CODE_SIZE\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".google.protobuf.FieldOptions.CType\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName = MName \"CType\"}, enumFilePath = [\"Text\",\"DescriptorProtos\",\"FieldOptions\",\"CType.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"CORD\"),(EnumCode {getEnumCode = 2},\"STRING_PIECE\")]}], knownKeyMap = fromList []}" fileDescriptorProto :: FileDescriptorProto fileDescriptorProto- = P'.getFromBS (P'.wireGet 11)- (P'.pack- "\213\ETB\nd/Users/chrisk/Documents/projects/haskell/develop/protocol-buffers/descriptor/tmp/../descriptor.proto\DC2\SIgoogle.protobuf\"\239\STX\n$DescriptorProtos.FileDescriptorProto\DC2\r\n\EOTname\CAN\SOH \SOH(\t\DC2\DLE\n\apackage\CAN\STX \SOH(\t\DC2\DC3\n\ndependency\CAN\ETX \ETX(\t\DC27\n\fmessage_type\CAN\EOT \ETX(\v2 DescriptorProtos.DescriptorProto\DC28\n\tenum_type\CAN\ENQ \ETX(\v2$DescriptorProtos.EnumDescriptorProto\DC29\n\aservice\CAN\ACK \ETX(\v2'DescriptorProtos.ServiceDescriptorProto\DC29\n\textension\CAN\a \ETX(\v2%DescriptorProtos.FieldDescriptorProto\DC2.\n\aoptions\CAN\b \SOH(\v2\FSDescriptorProtos.FileOptions\"\221\ETX\n DescriptorProtos.DescriptorProto\DC2\r\n\EOTname\CAN\SOH \SOH(\t\DC25\n\ENQfield\CAN\STX \ETX(\v2%DescriptorProtos.FieldDescriptorProto\DC29\n\textension\CAN\ACK \ETX(\v2%DescriptorProtos.FieldDescriptorProto\DC26\n\vnested_type\CAN\ETX \ETX(\v2 DescriptorProtos.DescriptorProto\DC28\n\tenum_type\CAN\EOT \ETX(\v2$DescriptorProtos.EnumDescriptorProto\DC2I\n\SIextension_range\CAN\ENQ \ETX(\v2/DescriptorProtos.DescriptorProto.ExtensionRange\DC21\n\aoptions\CAN\a \SOH(\v2\USDescriptorProtos.MessageOptions\SUBN\n/DescriptorProtos.DescriptorProto.ExtensionRange\DC2\SO\n\ENQstart\CAN\SOH \SOH(\ENQ\DC2\f\n\ETXend\CAN\STX \SOH(\ENQ\"\244\ENQ\n%DescriptorProtos.FieldDescriptorProto\DC2\r\n\EOTname\CAN\SOH \SOH(\t\DC2\SI\n\ACKnumber\CAN\ETX \SOH(\ENQ\DC2;\n\ENQlabel\CAN\EOT \SOH(\SO2+DescriptorProtos.FieldDescriptorProto.Label\DC2:\n\ENQtype'\CAN\ENQ \SOH(\SO2*DescriptorProtos.FieldDescriptorProto.Type\DC2\DC2\n\ttype_name\CAN\ACK \SOH(\t\DC2\DC1\n\bextendee\CAN\STX \SOH(\t\DC2\SYN\n\rdefault_value\CAN\a \SOH(\t\DC2/\n\aoptions\CAN\b \SOH(\v2\GSDescriptorProtos.FieldOptions\"\222\STX\n*DescriptorProtos.FieldDescriptorProto.Type\DC2\DLE\n\vTYPE_DOUBLE\DLE\SOH\DC2\SI\n\nTYPE_FLOAT\DLE\STX\DC2\SI\n\nTYPE_INT64\DLE\ETX\DC2\DLE\n\vTYPE_UINT64\DLE\EOT\DC2\SI\n\nTYPE_INT32\DLE\ENQ\DC2\DC1\n\fTYPE_FIXED64\DLE\ACK\DC2\DC1\n\fTYPE_FIXED32\DLE\a\DC2\SO\n\tTYPE_BOOL\DLE\b\DC2\DLE\n\vTYPE_STRING\DLE\t\DC2\SI\n\nTYPE_GROUP\DLE\n\DC2\DC1\n\fTYPE_MESSAGE\DLE\v\DC2\SI\n\nTYPE_BYTES\DLE\f\DC2\DLE\n\vTYPE_UINT32\DLE\r\DC2\SO\n\tTYPE_ENUM\DLE\SO\DC2\DC2\n\rTYPE_SFIXED32\DLE\SI\DC2\DC2\n\rTYPE_SFIXED64\DLE\DLE\DC2\DLE\n\vTYPE_SINT32\DLE\DC1\DC2\DLE\n\vTYPE_SINT64\DLE\DC2\"j\n+DescriptorProtos.FieldDescriptorProto.Label\DC2\DC3\n\SOLABEL_OPTIONAL\DLE\SOH\DC2\DC3\n\SOLABEL_REQUIRED\DLE\STX\DC2\DC3\n\SOLABEL_REPEATED\DLE\ETX\"\159\SOH\n$DescriptorProtos.EnumDescriptorProto\DC2\r\n\EOTname\CAN\SOH \SOH(\t\DC29\n\ENQvalue\CAN\STX \ETX(\v2)DescriptorProtos.EnumValueDescriptorProto\DC2.\n\aoptions\CAN\ETX \SOH(\v2\FSDescriptorProtos.EnumOptions\"~\n)DescriptorProtos.EnumValueDescriptorProto\DC2\r\n\EOTname\CAN\SOH \SOH(\t\DC2\SI\n\ACKnumber\CAN\STX \SOH(\ENQ\DC23\n\aoptions\CAN\ETX \SOH(\v2!DescriptorProtos.EnumValueOptions\"\163\SOH\n'DescriptorProtos.ServiceDescriptorProto\DC2\r\n\EOTname\CAN\SOH \SOH(\t\DC27\n\ACKmethod\CAN\STX \ETX(\v2&DescriptorProtos.MethodDescriptorProto\DC21\n\aoptions\CAN\ETX \SOH(\v2\USDescriptorProtos.ServiceOptions\"\146\SOH\n&DescriptorProtos.MethodDescriptorProto\DC2\r\n\EOTname\CAN\SOH \SOH(\t\DC2\DC3\n\ninput_type\CAN\STX \SOH(\t\DC2\DC4\n\voutput_type\CAN\ETX \SOH(\t\DC20\n\aoptions\CAN\EOT \SOH(\v2\RSDescriptorProtos.MethodOptions\"\139\STX\n\FSDescriptorProtos.FileOptions\DC2\NAK\n\fjava_package\CAN\SOH \SOH(\t\DC2\GS\n\DC4java_outer_classname\CAN\b \SOH(\t\DC2#\n\DC3java_multiple_files\CAN\n \SOH(\b:\ENQfalse\DC2K\n\foptimize_for\CAN\t \SOH(\SO2)DescriptorProtos.FileOptions.OptimizeMode:\tCODE_SIZE\"F\n)DescriptorProtos.FileOptions.OptimizeMode\DC2\n\n\ENQSPEED\DLE\SOH\DC2\SO\n\tCODE_SIZE\DLE\STX\"J\n\USDescriptorProtos.MessageOptions\DC2'\n\ETBmessage_set_wire_format\CAN\SOH \SOH(\b:\ENQfalse\"\182\SOH\n\GSDescriptorProtos.FieldOptions\DC23\n\ENQctype\CAN\SOH \SOH(\SO2#DescriptorProtos.FieldOptions.CType\DC2\GS\n\DC4experimental_map_key\CAN\t \SOH(\t\"B\n#DescriptorProtos.FieldOptions.CType\DC2\t\n\EOTCORD\DLE\SOH\DC2\DC1\n\fSTRING_PIECE\DLE\STX\"\US\n\FSDescriptorProtos.EnumOptions\"$\n!DescriptorProtos.EnumValueOptions\"\"\n\USDescriptorProtos.ServiceOptions\"!\n\RSDescriptorProtos.MethodOptionsB*\n\DC3com.google.protobufB\DLEDescriptorProtosH\SOH")+ = P'.getFromBS (P'.wireGet 11)+ (P'.pack+ "\233\SUB\n\DLEdescriptor.proto\DC2\SIgoogle.protobuf\"G\n\DC1FileDescriptorSet\DC22\n\EOTfile\CAN\SOH \ETX(\v2$.google.protobuf.FileDescriptorProto\"\220\STX\n\DC3FileDescriptorProto\DC2\f\n\EOTname\CAN\SOH \SOH(\t\DC2\SI\n\apackage\CAN\STX \SOH(\t\DC2\DC2\n\ndependency\CAN\ETX \ETX(\t\DC26\n\fmessage_type\CAN\EOT \ETX(\v2 .google.protobuf.DescriptorProto\DC27\n\tenum_type\CAN\ENQ \ETX(\v2$.google.protobuf.EnumDescriptorProto\DC28\n\aservice\CAN\ACK \ETX(\v2'.google.protobuf.ServiceDescriptorProto\DC28\n\textension\CAN\a \ETX(\v2%.google.protobuf.FieldDescriptorProto\DC2-\n\aoptions\CAN\b \SOH(\v2\FS.google.protobuf.FileOptions\"\169\ETX\n\SIDescriptorProto\DC2\f\n\EOTname\CAN\SOH \SOH(\t\DC24\n\ENQfield\CAN\STX \ETX(\v2%.google.protobuf.FieldDescriptorProto\DC28\n\textension\CAN\ACK \ETX(\v2%.google.protobuf.FieldDescriptorProto\DC25\n\vnested_type\CAN\ETX \ETX(\v2 .google.protobuf.DescriptorProto\DC27\n\tenum_type\CAN\EOT \ETX(\v2$.google.protobuf.EnumDescriptorProto\DC2H\n\SIextension_range\CAN\ENQ \ETX(\v2/.google.protobuf.DescriptorProto.ExtensionRange\DC20\n\aoptions\CAN\a \SOH(\v2\US.google.protobuf.MessageOptions\SUB,\n\SOExtensionRange\DC2\r\n\ENQstart\CAN\SOH \SOH(\ENQ\DC2\v\n\ETXend\CAN\STX \SOH(\ENQ\"\148\ENQ\n\DC4FieldDescriptorProto\DC2\f\n\EOTname\CAN\SOH \SOH(\t\DC2\SO\n\ACKnumber\CAN\ETX \SOH(\ENQ\DC2:\n\ENQlabel\CAN\EOT \SOH(\SO2+.google.protobuf.FieldDescriptorProto.Label\DC28\n\EOTtype\CAN\ENQ \SOH(\SO2*.google.protobuf.FieldDescriptorProto.Type\DC2\DC1\n\ttype_name\CAN\ACK \SOH(\t\DC2\DLE\n\bextendee\CAN\STX \SOH(\t\DC2\NAK\n\rdefault_value\CAN\a \SOH(\t\DC2.\n\aoptions\CAN\b \SOH(\v2\GS.google.protobuf.FieldOptions\"\182\STX\n\EOTType\DC2\SI\n\vTYPE_DOUBLE\DLE\SOH\DC2\SO\n\nTYPE_FLOAT\DLE\STX\DC2\SO\n\nTYPE_INT64\DLE\ETX\DC2\SI\n\vTYPE_UINT64\DLE\EOT\DC2\SO\n\nTYPE_INT32\DLE\ENQ\DC2\DLE\n\fTYPE_FIXED64\DLE\ACK\DC2\DLE\n\fTYPE_FIXED32\DLE\a\DC2\r\n\tTYPE_BOOL\DLE\b\DC2\SI\n\vTYPE_STRING\DLE\t\DC2\SO\n\nTYPE_GROUP\DLE\n\DC2\DLE\n\fTYPE_MESSAGE\DLE\v\DC2\SO\n\nTYPE_BYTES\DLE\f\DC2\SI\n\vTYPE_UINT32\DLE\r\DC2\r\n\tTYPE_ENUM\DLE\SO\DC2\DC1\n\rTYPE_SFIXED32\DLE\SI\DC2\DC1\n\rTYPE_SFIXED64\DLE\DLE\DC2\SI\n\vTYPE_SINT32\DLE\DC1\DC2\SI\n\vTYPE_SINT64\DLE\DC2\"C\n\ENQLabel\DC2\DC2\n\SOLABEL_OPTIONAL\DLE\SOH\DC2\DC2\n\SOLABEL_REQUIRED\DLE\STX\DC2\DC2\n\SOLABEL_REPEATED\DLE\ETX\"\140\SOH\n\DC3EnumDescriptorProto\DC2\f\n\EOTname\CAN\SOH \SOH(\t\DC28\n\ENQvalue\CAN\STX \ETX(\v2).google.protobuf.EnumValueDescriptorProto\DC2-\n\aoptions\CAN\ETX \SOH(\v2\FS.google.protobuf.EnumOptions\"l\n\CANEnumValueDescriptorProto\DC2\f\n\EOTname\CAN\SOH \SOH(\t\DC2\SO\n\ACKnumber\CAN\STX \SOH(\ENQ\DC22\n\aoptions\CAN\ETX \SOH(\v2!.google.protobuf.EnumValueOptions\"\144\SOH\n\SYNServiceDescriptorProto\DC2\f\n\EOTname\CAN\SOH \SOH(\t\DC26\n\ACKmethod\CAN\STX \ETX(\v2&.google.protobuf.MethodDescriptorProto\DC20\n\aoptions\CAN\ETX \SOH(\v2\US.google.protobuf.ServiceOptions\"\DEL\n\NAKMethodDescriptorProto\DC2\f\n\EOTname\CAN\SOH \SOH(\t\DC2\DC2\n\ninput_type\CAN\STX \SOH(\t\DC2\DC3\n\voutput_type\CAN\ETX \SOH(\t\DC2/\n\aoptions\CAN\EOT \SOH(\v2\RS.google.protobuf.MethodOptions\"\171\STX\n\vFileOptions\DC2\DC4\n\fjava_package\CAN\SOH \SOH(\t\DC2\FS\n\DC4java_outer_classname\CAN\b \SOH(\t\DC2\"\n\DC3java_multiple_files\CAN\n \SOH(\b:\ENQfalse\DC2J\n\foptimize_for\CAN\t \SOH(\SO2).google.protobuf.FileOptions.OptimizeMode:\tCODE_SIZE\DC2C\n\DC4uninterpreted_option\CAN\231\a \ETX(\v2$.google.protobuf.UninterpretedOption\"(\n\fOptimizeMode\DC2\t\n\ENQSPEED\DLE\SOH\DC2\r\n\tCODE_SIZE\DLE\STX*\t\b\232\a\DLE\128\128\128\128\STX\"\136\SOH\n\SOMessageOptions\DC2&\n\ETBmessage_set_wire_format\CAN\SOH \SOH(\b:\ENQfalse\DC2C\n\DC4uninterpreted_option\CAN\231\a \ETX(\v2$.google.protobuf.UninterpretedOption*\t\b\232\a\DLE\128\128\128\128\STX\"\213\SOH\n\fFieldOptions\DC22\n\ENQctype\CAN\SOH \SOH(\SO2#.google.protobuf.FieldOptions.CType\DC2\FS\n\DC4experimental_map_key\CAN\t \SOH(\t\DC2C\n\DC4uninterpreted_option\CAN\231\a \ETX(\v2$.google.protobuf.UninterpretedOption\"#\n\ENQCType\DC2\b\n\EOTCORD\DLE\SOH\DC2\DLE\n\fSTRING_PIECE\DLE\STX*\t\b\232\a\DLE\128\128\128\128\STX\"]\n\vEnumOptions\DC2C\n\DC4uninterpreted_option\CAN\231\a \ETX(\v2$.google.protobuf.UninterpretedOption*\t\b\232\a\DLE\128\128\128\128\STX\"b\n\DLEEnumValueOptions\DC2C\n\DC4uninterpreted_option\CAN\231\a \ETX(\v2$.google.protobuf.UninterpretedOption*\t\b\232\a\DLE\128\128\128\128\STX\"`\n\SOServiceOptions\DC2C\n\DC4uninterpreted_option\CAN\231\a \ETX(\v2$.google.protobuf.UninterpretedOption*\t\b\232\a\DLE\128\128\128\128\STX\"_\n\rMethodOptions\DC2C\n\DC4uninterpreted_option\CAN\231\a \ETX(\v2$.google.protobuf.UninterpretedOption*\t\b\232\a\DLE\128\128\128\128\STX\"\133\STX\n\DC3UninterpretedOption\DC2;\n\EOTname\CAN\STX \ETX(\v2-.google.protobuf.UninterpretedOption.NamePart\DC2\CAN\n\DLEidentifier_value\CAN\ETX \SOH(\t\DC2\SUB\n\DC2positive_int_value\CAN\EOT \SOH(\EOT\DC2\SUB\n\DC2negative_int_value\CAN\ENQ \SOH(\ETX\DC2\DC4\n\fdouble_value\CAN\ACK \SOH(\SOH\DC2\DC4\n\fstring_value\CAN\a \SOH(\f\SUB3\n\bNamePart\DC2\DC1\n\tname_part\CAN\SOH \STX(\t\DC2\DC4\n\fis_extension\CAN\STX \STX(\bB)\n\DC3com.google.protobufB\DLEDescriptorProtosH\SOH")
Text/DescriptorProtos/DescriptorProto.hs view
@@ -21,71 +21,68 @@ instance P'.Mergeable DescriptorProto where mergeEmpty- = DescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty- P'.mergeEmpty+ = DescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty mergeAppend (DescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8) (DescriptorProto y'1 y'2 y'3 y'4 y'5 y'6 y'7 y'8)- = DescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)- (P'.mergeAppend x'5 y'5)- (P'.mergeAppend x'6 y'6)- (P'.mergeAppend x'7 y'7)- (P'.mergeAppend x'8 y'8)+ = DescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ (P'.mergeAppend x'5 y'5)+ (P'.mergeAppend x'6 y'6)+ (P'.mergeAppend x'7 y'7)+ (P'.mergeAppend x'8 y'8) instance P'.Default DescriptorProto where defaultValue- = DescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue- P'.defaultValue- P'.defaultValue+ = DescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue+ P'.defaultValue instance P'.Wire DescriptorProto where wireSize ft' self'@(DescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size- = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeRep 1 11 x'2 + P'.wireSizeRep 1 11 x'3 + P'.wireSizeRep 1 11 x'4 +- P'.wireSizeRep 1 11 x'5- + P'.wireSizeRep 1 11 x'6- + P'.wireSizeOpt 1 11 x'7- + P'.wireSizeUnknownField x'8)+ = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeRep 1 11 x'2 + P'.wireSizeRep 1 11 x'3 + P'.wireSizeRep 1 11 x'4 ++ P'.wireSizeRep 1 11 x'5+ + P'.wireSizeRep 1 11 x'6+ + P'.wireSizeOpt 1 11 x'7+ + P'.wireSizeUnknownField x'8) wirePut ft' self'@(DescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 10 9 x'1- P'.wirePutRep 18 11 x'2- P'.wirePutRep 26 11 x'4- P'.wirePutRep 34 11 x'5- P'.wirePutRep 42 11 x'6- P'.wirePutRep 50 11 x'3- P'.wirePutOpt 58 11 x'7- P'.wirePutUnknownField x'8+ = do+ P'.wirePutOpt 10 9 x'1+ P'.wirePutRep 18 11 x'2+ P'.wirePutRep 26 11 x'4+ P'.wirePutRep 34 11 x'5+ P'.wirePutRep 42 11 x'6+ P'.wirePutRep 50 11 x'3+ P'.wirePutOpt 58 11 x'7+ P'.wirePutUnknownField x'8 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)- 2 -> P'.fmap (\ new'Field -> old'Self{field = P'.append (field old'Self) new'Field}) (P'.wireGet 11)- 6 -> P'.fmap (\ new'Field -> old'Self{extension = P'.append (extension old'Self) new'Field}) (P'.wireGet 11)- 3 -> P'.fmap (\ new'Field -> old'Self{nested_type = P'.append (nested_type old'Self) new'Field}) (P'.wireGet 11)- 4 -> P'.fmap (\ new'Field -> old'Self{enum_type = P'.append (enum_type old'Self) new'Field}) (P'.wireGet 11)- 5 -> P'.fmap (\ new'Field -> old'Self{extension_range = P'.append (extension_range old'Self) new'Field})- (P'.wireGet 11)- 7 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)})- (P'.wireGet 11)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)+ 2 -> P'.fmap (\ new'Field -> old'Self{field = P'.append (field old'Self) new'Field}) (P'.wireGet 11)+ 6 -> P'.fmap (\ new'Field -> old'Self{extension = P'.append (extension old'Self) new'Field}) (P'.wireGet 11)+ 3 -> P'.fmap (\ new'Field -> old'Self{nested_type = P'.append (nested_type old'Self) new'Field}) (P'.wireGet 11)+ 4 -> P'.fmap (\ new'Field -> old'Self{enum_type = P'.append (enum_type old'Self) new'Field}) (P'.wireGet 11)+ 5+ -> P'.fmap (\ new'Field -> old'Self{extension_range = P'.append (extension_range old'Self) new'Field}) (P'.wireGet 11)+ 7 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)}) (P'.wireGet 11)+ _ -> P'.unknownField field'Number instance P'.MessageAPI msg' (msg' -> DescriptorProto) DescriptorProto where getVal m' f' = f' m'@@ -94,5 +91,5 @@ instance P'.ReflectDescriptor DescriptorProto where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"DescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"DescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"field\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"extension\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"nested_type\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"DescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"enum_type\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"extension_range\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"ExtensionRange\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MessageOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"DescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"DescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.field\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"field\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.extension\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"extension\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.nested_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"nested_type\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"DescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.enum_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"enum_type\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.extension_range\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"extension_range\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto.ExtensionRange\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName = MName \"ExtensionRange\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.MessageOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MessageOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/DescriptorProto/ExtensionRange.hs view
@@ -13,44 +13,44 @@ instance P'.Mergeable ExtensionRange where mergeEmpty = ExtensionRange P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty mergeAppend (ExtensionRange x'1 x'2 x'3) (ExtensionRange y'1 y'2 y'3)- = ExtensionRange (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)+ = ExtensionRange (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) instance P'.Default ExtensionRange where defaultValue = ExtensionRange P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire ExtensionRange where wireSize ft' self'@(ExtensionRange x'1 x'2 x'3)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size = (P'.wireSizeOpt 1 5 x'1 + P'.wireSizeOpt 1 5 x'2 + P'.wireSizeUnknownField x'3) wirePut ft' self'@(ExtensionRange x'1 x'2 x'3)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 8 5 x'1- P'.wirePutOpt 16 5 x'2- P'.wirePutUnknownField x'3+ = do+ P'.wirePutOpt 8 5 x'1+ P'.wirePutOpt 16 5 x'2+ P'.wirePutUnknownField x'3 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{start = P'.Just new'Field}) (P'.wireGet 5)- 2 -> P'.fmap (\ new'Field -> old'Self{end = P'.Just new'Field}) (P'.wireGet 5)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{start = P'.Just new'Field}) (P'.wireGet 5)+ 2 -> P'.fmap (\ new'Field -> old'Self{end = P'.Just new'Field}) (P'.wireGet 5)+ _ -> P'.unknownField field'Number instance P'.MessageAPI msg' (msg' -> ExtensionRange) ExtensionRange where getVal m' f' = f' m'@@ -59,5 +59,5 @@ instance P'.ReflectDescriptor ExtensionRange where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto\", baseName = \"ExtensionRange\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"DescriptorProto\",\"ExtensionRange.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto.ExtensionRange\", baseName = \"start\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.DescriptorProto.ExtensionRange\", baseName = \"end\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto.ExtensionRange\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"DescriptorProto\"], baseName = MName \"ExtensionRange\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"DescriptorProto\",\"ExtensionRange.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.ExtensionRange.start\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\",MName \"ExtensionRange\"], baseName' = FName \"start\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.DescriptorProto.ExtensionRange.end\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"DescriptorProto\",MName \"ExtensionRange\"], baseName' = FName \"end\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/EnumDescriptorProto.hs view
@@ -16,47 +16,46 @@ instance P'.Mergeable EnumDescriptorProto where mergeEmpty = EnumDescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty mergeAppend (EnumDescriptorProto x'1 x'2 x'3 x'4) (EnumDescriptorProto y'1 y'2 y'3 y'4)- = EnumDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ = EnumDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4) instance P'.Default EnumDescriptorProto where defaultValue = EnumDescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire EnumDescriptorProto where wireSize ft' self'@(EnumDescriptorProto x'1 x'2 x'3 x'4)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeRep 1 11 x'2 + P'.wireSizeOpt 1 11 x'3 + P'.wireSizeUnknownField x'4) wirePut ft' self'@(EnumDescriptorProto x'1 x'2 x'3 x'4)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 10 9 x'1- P'.wirePutRep 18 11 x'2- P'.wirePutOpt 26 11 x'3- P'.wirePutUnknownField x'4+ = do+ P'.wirePutOpt 10 9 x'1+ P'.wirePutRep 18 11 x'2+ P'.wirePutOpt 26 11 x'3+ P'.wirePutUnknownField x'4 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)- 2 -> P'.fmap (\ new'Field -> old'Self{value = P'.append (value old'Self) new'Field}) (P'.wireGet 11)- 3 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)})- (P'.wireGet 11)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)+ 2 -> P'.fmap (\ new'Field -> old'Self{value = P'.append (value old'Self) new'Field}) (P'.wireGet 11)+ 3 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)}) (P'.wireGet 11)+ _ -> P'.unknownField field'Number instance P'.MessageAPI msg' (msg' -> EnumDescriptorProto) EnumDescriptorProto where getVal m' f' = f' m'@@ -65,5 +64,5 @@ instance P'.ReflectDescriptor EnumDescriptorProto where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumDescriptorProto\", baseName = \"value\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumValueDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"value\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumValueDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/EnumOptions.hs view
@@ -1,51 +1,70 @@ module Text.DescriptorProtos.EnumOptions (EnumOptions(..)) where-import Prelude ((+))+import Prelude ((+), (<=), (&&), ( || )) import qualified Prelude as P' import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.UninterpretedOption as DescriptorProtos (UninterpretedOption) -data EnumOptions = EnumOptions{unknown'field :: P'.UnknownField}+data EnumOptions = EnumOptions{uninterpreted_option :: P'.Seq DescriptorProtos.UninterpretedOption, ext'field :: P'.ExtField,+ unknown'field :: P'.UnknownField} deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable) +instance P'.ExtendMessage EnumOptions where+ getExtField = ext'field+ putExtField e'f msg = msg{ext'field = e'f}+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)+ instance P'.UnknownMessage EnumOptions where getUnknownField = unknown'field putUnknownField u'f msg = msg{unknown'field = u'f} instance P'.Mergeable EnumOptions where- mergeEmpty = EnumOptions P'.mergeEmpty- mergeAppend (EnumOptions x'1) (EnumOptions y'1) = EnumOptions (P'.mergeAppend x'1 y'1)+ mergeEmpty = EnumOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (EnumOptions x'1 x'2 x'3) (EnumOptions y'1 y'2 y'3)+ = EnumOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) instance P'.Default EnumOptions where- defaultValue = EnumOptions P'.defaultValue+ defaultValue = EnumOptions P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire EnumOptions where- wireSize ft' self'@(EnumOptions x'1)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ wireSize ft' self'@(EnumOptions x'1 x'2 x'3)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where- calc'Size = (P'.wireSizeUnknownField x'1)- wirePut ft' self'@(EnumOptions x'1)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ calc'Size = (P'.wireSizeRep 2 11 x'1 + P'.wireSizeExtField x'2 + P'.wireSizeUnknownField x'3)+ wirePut ft' self'@(EnumOptions x'1 x'2 x'3)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.return ()+ = do+ P'.wirePutRep 7994 11 x'1+ P'.wirePutExtField x'2+ P'.wirePutUnknownField x'3 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith other'Field update'Self+ 11 -> P'.getMessageWith other'Field update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- _ -> P'.unknownField field'Number+ = case field'Number of+ 999+ -> P'.fmap (\ new'Field -> old'Self{uninterpreted_option = P'.append (uninterpreted_option old'Self) new'Field})+ (P'.wireGet 11)+ _ -> P'.unknownField field'Number+ other'Field field'Number wire'Type old'Self+ = (if P'.or [1000 <= field'Number && field'Number <= 18999, 20000 <= field'Number] then P'.loadExtension else+ P'.loadUnknown)+ field'Number+ wire'Type+ old'Self instance P'.MessageAPI msg' (msg' -> EnumOptions) EnumOptions where getVal m' f' = f' m'@@ -54,5 +73,5 @@ instance P'.ReflectDescriptor EnumOptions where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumOptions.hs\"], isGroup = False, fields = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/EnumValueDescriptorProto.hs view
@@ -16,47 +16,46 @@ instance P'.Mergeable EnumValueDescriptorProto where mergeEmpty = EnumValueDescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty mergeAppend (EnumValueDescriptorProto x'1 x'2 x'3 x'4) (EnumValueDescriptorProto y'1 y'2 y'3 y'4)- = EnumValueDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ = EnumValueDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4) instance P'.Default EnumValueDescriptorProto where defaultValue = EnumValueDescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire EnumValueDescriptorProto where wireSize ft' self'@(EnumValueDescriptorProto x'1 x'2 x'3 x'4)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 5 x'2 + P'.wireSizeOpt 1 11 x'3 + P'.wireSizeUnknownField x'4) wirePut ft' self'@(EnumValueDescriptorProto x'1 x'2 x'3 x'4)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 10 9 x'1- P'.wirePutOpt 16 5 x'2- P'.wirePutOpt 26 11 x'3- P'.wirePutUnknownField x'4+ = do+ P'.wirePutOpt 10 9 x'1+ P'.wirePutOpt 16 5 x'2+ P'.wirePutOpt 26 11 x'3+ P'.wirePutUnknownField x'4 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)- 2 -> P'.fmap (\ new'Field -> old'Self{number = P'.Just new'Field}) (P'.wireGet 5)- 3 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)})- (P'.wireGet 11)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)+ 2 -> P'.fmap (\ new'Field -> old'Self{number = P'.Just new'Field}) (P'.wireGet 5)+ 3 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)}) (P'.wireGet 11)+ _ -> P'.unknownField field'Number instance P'.MessageAPI msg' (msg' -> EnumValueDescriptorProto) EnumValueDescriptorProto where getVal m' f' = f' m'@@ -65,5 +64,5 @@ instance P'.ReflectDescriptor EnumValueDescriptorProto where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumValueDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumValueDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumValueDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumValueDescriptorProto\", baseName = \"number\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.EnumValueDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumValueOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumValueDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumValueDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumValueDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumValueDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumValueDescriptorProto.number\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumValueDescriptorProto\"], baseName' = FName \"number\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumValueDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumValueDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumValueOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/EnumValueOptions.hs view
@@ -1,51 +1,70 @@ module Text.DescriptorProtos.EnumValueOptions (EnumValueOptions(..)) where-import Prelude ((+))+import Prelude ((+), (<=), (&&), ( || )) import qualified Prelude as P' import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.UninterpretedOption as DescriptorProtos (UninterpretedOption) -data EnumValueOptions = EnumValueOptions{unknown'field :: P'.UnknownField}+data EnumValueOptions = EnumValueOptions{uninterpreted_option :: P'.Seq DescriptorProtos.UninterpretedOption,+ ext'field :: P'.ExtField, unknown'field :: P'.UnknownField} deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable) +instance P'.ExtendMessage EnumValueOptions where+ getExtField = ext'field+ putExtField e'f msg = msg{ext'field = e'f}+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)+ instance P'.UnknownMessage EnumValueOptions where getUnknownField = unknown'field putUnknownField u'f msg = msg{unknown'field = u'f} instance P'.Mergeable EnumValueOptions where- mergeEmpty = EnumValueOptions P'.mergeEmpty- mergeAppend (EnumValueOptions x'1) (EnumValueOptions y'1) = EnumValueOptions (P'.mergeAppend x'1 y'1)+ mergeEmpty = EnumValueOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (EnumValueOptions x'1 x'2 x'3) (EnumValueOptions y'1 y'2 y'3)+ = EnumValueOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) instance P'.Default EnumValueOptions where- defaultValue = EnumValueOptions P'.defaultValue+ defaultValue = EnumValueOptions P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire EnumValueOptions where- wireSize ft' self'@(EnumValueOptions x'1)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ wireSize ft' self'@(EnumValueOptions x'1 x'2 x'3)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where- calc'Size = (P'.wireSizeUnknownField x'1)- wirePut ft' self'@(EnumValueOptions x'1)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ calc'Size = (P'.wireSizeRep 2 11 x'1 + P'.wireSizeExtField x'2 + P'.wireSizeUnknownField x'3)+ wirePut ft' self'@(EnumValueOptions x'1 x'2 x'3)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.return ()+ = do+ P'.wirePutRep 7994 11 x'1+ P'.wirePutExtField x'2+ P'.wirePutUnknownField x'3 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith other'Field update'Self+ 11 -> P'.getMessageWith other'Field update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- _ -> P'.unknownField field'Number+ = case field'Number of+ 999+ -> P'.fmap (\ new'Field -> old'Self{uninterpreted_option = P'.append (uninterpreted_option old'Self) new'Field})+ (P'.wireGet 11)+ _ -> P'.unknownField field'Number+ other'Field field'Number wire'Type old'Self+ = (if P'.or [1000 <= field'Number && field'Number <= 18999, 20000 <= field'Number] then P'.loadExtension else+ P'.loadUnknown)+ field'Number+ wire'Type+ old'Self instance P'.MessageAPI msg' (msg' -> EnumValueOptions) EnumValueOptions where getVal m' f' = f' m'@@ -54,5 +73,5 @@ instance P'.ReflectDescriptor EnumValueOptions where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumValueOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumValueOptions.hs\"], isGroup = False, fields = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumValueOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumValueOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumValueOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumValueOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/FieldDescriptorProto.hs view
@@ -21,76 +21,75 @@ instance P'.Mergeable FieldDescriptorProto where mergeEmpty- = FieldDescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty- P'.mergeEmpty- P'.mergeEmpty+ = FieldDescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ P'.mergeEmpty+ P'.mergeEmpty mergeAppend (FieldDescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9) (FieldDescriptorProto y'1 y'2 y'3 y'4 y'5 y'6 y'7 y'8 y'9)- = FieldDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)- (P'.mergeAppend x'5 y'5)- (P'.mergeAppend x'6 y'6)- (P'.mergeAppend x'7 y'7)- (P'.mergeAppend x'8 y'8)- (P'.mergeAppend x'9 y'9)+ = FieldDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ (P'.mergeAppend x'5 y'5)+ (P'.mergeAppend x'6 y'6)+ (P'.mergeAppend x'7 y'7)+ (P'.mergeAppend x'8 y'8)+ (P'.mergeAppend x'9 y'9) instance P'.Default FieldDescriptorProto where defaultValue- = FieldDescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue- P'.defaultValue- P'.defaultValue- P'.defaultValue+ = FieldDescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue+ P'.defaultValue+ P'.defaultValue+ P'.defaultValue instance P'.Wire FieldDescriptorProto where wireSize ft' self'@(FieldDescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size- = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 5 x'2 + P'.wireSizeOpt 1 14 x'3 + P'.wireSizeOpt 1 14 x'4 +- P'.wireSizeOpt 1 9 x'5- + P'.wireSizeOpt 1 9 x'6- + P'.wireSizeOpt 1 9 x'7- + P'.wireSizeOpt 1 11 x'8- + P'.wireSizeUnknownField x'9)+ = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 5 x'2 + P'.wireSizeOpt 1 14 x'3 + P'.wireSizeOpt 1 14 x'4 ++ P'.wireSizeOpt 1 9 x'5+ + P'.wireSizeOpt 1 9 x'6+ + P'.wireSizeOpt 1 9 x'7+ + P'.wireSizeOpt 1 11 x'8+ + P'.wireSizeUnknownField x'9) wirePut ft' self'@(FieldDescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 10 9 x'1- P'.wirePutOpt 18 9 x'6- P'.wirePutOpt 24 5 x'2- P'.wirePutOpt 32 14 x'3- P'.wirePutOpt 40 14 x'4- P'.wirePutOpt 50 9 x'5- P'.wirePutOpt 58 9 x'7- P'.wirePutOpt 66 11 x'8- P'.wirePutUnknownField x'9+ = do+ P'.wirePutOpt 10 9 x'1+ P'.wirePutOpt 18 9 x'6+ P'.wirePutOpt 24 5 x'2+ P'.wirePutOpt 32 14 x'3+ P'.wirePutOpt 40 14 x'4+ P'.wirePutOpt 50 9 x'5+ P'.wirePutOpt 58 9 x'7+ P'.wirePutOpt 66 11 x'8+ P'.wirePutUnknownField x'9 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)- 3 -> P'.fmap (\ new'Field -> old'Self{number = P'.Just new'Field}) (P'.wireGet 5)- 4 -> P'.fmap (\ new'Field -> old'Self{label = P'.Just new'Field}) (P'.wireGet 14)- 5 -> P'.fmap (\ new'Field -> old'Self{type' = P'.Just new'Field}) (P'.wireGet 14)- 6 -> P'.fmap (\ new'Field -> old'Self{type_name = P'.Just new'Field}) (P'.wireGet 9)- 2 -> P'.fmap (\ new'Field -> old'Self{extendee = P'.Just new'Field}) (P'.wireGet 9)- 7 -> P'.fmap (\ new'Field -> old'Self{default_value = P'.Just new'Field}) (P'.wireGet 9)- 8 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)})- (P'.wireGet 11)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)+ 3 -> P'.fmap (\ new'Field -> old'Self{number = P'.Just new'Field}) (P'.wireGet 5)+ 4 -> P'.fmap (\ new'Field -> old'Self{label = P'.Just new'Field}) (P'.wireGet 14)+ 5 -> P'.fmap (\ new'Field -> old'Self{type' = P'.Just new'Field}) (P'.wireGet 14)+ 6 -> P'.fmap (\ new'Field -> old'Self{type_name = P'.Just new'Field}) (P'.wireGet 9)+ 2 -> P'.fmap (\ new'Field -> old'Self{extendee = P'.Just new'Field}) (P'.wireGet 9)+ 7 -> P'.fmap (\ new'Field -> old'Self{default_value = P'.Just new'Field}) (P'.wireGet 9)+ 8 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)}) (P'.wireGet 11)+ _ -> P'.unknownField field'Number instance P'.MessageAPI msg' (msg' -> FieldDescriptorProto) FieldDescriptorProto where getVal m' f' = f' m'@@ -99,5 +98,5 @@ instance P'.ReflectDescriptor FieldDescriptorProto where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FieldDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"number\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"label\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"Label\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"type'\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"Type\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"type_name\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"extendee\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"default_value\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FieldDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.number\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"number\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.label\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"label\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto.Label\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName = MName \"Label\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"type'\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto.Type\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName = MName \"Type\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.type_name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"type_name\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.extendee\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"extendee\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.default_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"default_value\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/FieldDescriptorProto/Label.hs view
@@ -42,8 +42,10 @@ instance P'.ReflectEnum Label where reflectEnum- = [(1, "LABEL_OPTIONAL", LABEL_OPTIONAL), (2, "LABEL_REQUIRED", LABEL_REQUIRED), (3, "LABEL_REPEATED", LABEL_REPEATED)]+ = [(1, "LABEL_OPTIONAL", LABEL_OPTIONAL), (2, "LABEL_REQUIRED", LABEL_REQUIRED), (3, "LABEL_REPEATED", LABEL_REPEATED)] reflectEnumInfo _- = P'.EnumInfo (P'.ProtoName "Text" "DescriptorProtos.FieldDescriptorProto" "Label")- ["Text", "DescriptorProtos", "FieldDescriptorProto", "Label.hs"]- [(1, "LABEL_OPTIONAL"), (2, "LABEL_REQUIRED"), (3, "LABEL_REPEATED")]+ = P'.EnumInfo+ (P'.makePNF (P'.pack ".google.protobuf.FieldDescriptorProto.Label") ["Text"] ["DescriptorProtos", "FieldDescriptorProto"]+ "Label")+ ["Text", "DescriptorProtos", "FieldDescriptorProto", "Label.hs"]+ [(1, "LABEL_OPTIONAL"), (2, "LABEL_REQUIRED"), (3, "LABEL_REPEATED")]
Text/DescriptorProtos/FieldDescriptorProto/Type.hs view
@@ -117,16 +117,18 @@ instance P'.ReflectEnum Type where reflectEnum- = [(1, "TYPE_DOUBLE", TYPE_DOUBLE), (2, "TYPE_FLOAT", TYPE_FLOAT), (3, "TYPE_INT64", TYPE_INT64),- (4, "TYPE_UINT64", TYPE_UINT64), (5, "TYPE_INT32", TYPE_INT32), (6, "TYPE_FIXED64", TYPE_FIXED64),- (7, "TYPE_FIXED32", TYPE_FIXED32), (8, "TYPE_BOOL", TYPE_BOOL), (9, "TYPE_STRING", TYPE_STRING),- (10, "TYPE_GROUP", TYPE_GROUP), (11, "TYPE_MESSAGE", TYPE_MESSAGE), (12, "TYPE_BYTES", TYPE_BYTES),- (13, "TYPE_UINT32", TYPE_UINT32), (14, "TYPE_ENUM", TYPE_ENUM), (15, "TYPE_SFIXED32", TYPE_SFIXED32),- (16, "TYPE_SFIXED64", TYPE_SFIXED64), (17, "TYPE_SINT32", TYPE_SINT32), (18, "TYPE_SINT64", TYPE_SINT64)]+ = [(1, "TYPE_DOUBLE", TYPE_DOUBLE), (2, "TYPE_FLOAT", TYPE_FLOAT), (3, "TYPE_INT64", TYPE_INT64),+ (4, "TYPE_UINT64", TYPE_UINT64), (5, "TYPE_INT32", TYPE_INT32), (6, "TYPE_FIXED64", TYPE_FIXED64),+ (7, "TYPE_FIXED32", TYPE_FIXED32), (8, "TYPE_BOOL", TYPE_BOOL), (9, "TYPE_STRING", TYPE_STRING),+ (10, "TYPE_GROUP", TYPE_GROUP), (11, "TYPE_MESSAGE", TYPE_MESSAGE), (12, "TYPE_BYTES", TYPE_BYTES),+ (13, "TYPE_UINT32", TYPE_UINT32), (14, "TYPE_ENUM", TYPE_ENUM), (15, "TYPE_SFIXED32", TYPE_SFIXED32),+ (16, "TYPE_SFIXED64", TYPE_SFIXED64), (17, "TYPE_SINT32", TYPE_SINT32), (18, "TYPE_SINT64", TYPE_SINT64)] reflectEnumInfo _- = P'.EnumInfo (P'.ProtoName "Text" "DescriptorProtos.FieldDescriptorProto" "Type")- ["Text", "DescriptorProtos", "FieldDescriptorProto", "Type.hs"]- [(1, "TYPE_DOUBLE"), (2, "TYPE_FLOAT"), (3, "TYPE_INT64"), (4, "TYPE_UINT64"), (5, "TYPE_INT32"), (6, "TYPE_FIXED64"),- (7, "TYPE_FIXED32"), (8, "TYPE_BOOL"), (9, "TYPE_STRING"), (10, "TYPE_GROUP"), (11, "TYPE_MESSAGE"), (12, "TYPE_BYTES"),- (13, "TYPE_UINT32"), (14, "TYPE_ENUM"), (15, "TYPE_SFIXED32"), (16, "TYPE_SFIXED64"), (17, "TYPE_SINT32"),- (18, "TYPE_SINT64")]+ = P'.EnumInfo+ (P'.makePNF (P'.pack ".google.protobuf.FieldDescriptorProto.Type") ["Text"] ["DescriptorProtos", "FieldDescriptorProto"]+ "Type")+ ["Text", "DescriptorProtos", "FieldDescriptorProto", "Type.hs"]+ [(1, "TYPE_DOUBLE"), (2, "TYPE_FLOAT"), (3, "TYPE_INT64"), (4, "TYPE_UINT64"), (5, "TYPE_INT32"), (6, "TYPE_FIXED64"),+ (7, "TYPE_FIXED32"), (8, "TYPE_BOOL"), (9, "TYPE_STRING"), (10, "TYPE_GROUP"), (11, "TYPE_MESSAGE"), (12, "TYPE_BYTES"),+ (13, "TYPE_UINT32"), (14, "TYPE_ENUM"), (15, "TYPE_SFIXED32"), (16, "TYPE_SFIXED64"), (17, "TYPE_SINT32"),+ (18, "TYPE_SINT64")]
Text/DescriptorProtos/FieldOptions.hs view
@@ -1,58 +1,79 @@ module Text.DescriptorProtos.FieldOptions (FieldOptions(..)) where-import Prelude ((+))+import Prelude ((+), (<=), (&&), ( || )) import qualified Prelude as P' import qualified Text.ProtocolBuffers.Header as P' import qualified Text.DescriptorProtos.FieldOptions.CType as DescriptorProtos.FieldOptions (CType)+import qualified Text.DescriptorProtos.UninterpretedOption as DescriptorProtos (UninterpretedOption) data FieldOptions = FieldOptions{ctype :: P'.Maybe DescriptorProtos.FieldOptions.CType, experimental_map_key :: P'.Maybe P'.Utf8,+ uninterpreted_option :: P'.Seq DescriptorProtos.UninterpretedOption, ext'field :: P'.ExtField, unknown'field :: P'.UnknownField} deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable) +instance P'.ExtendMessage FieldOptions where+ getExtField = ext'field+ putExtField e'f msg = msg{ext'field = e'f}+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)+ instance P'.UnknownMessage FieldOptions where getUnknownField = unknown'field putUnknownField u'f msg = msg{unknown'field = u'f} instance P'.Mergeable FieldOptions where- mergeEmpty = FieldOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty- mergeAppend (FieldOptions x'1 x'2 x'3) (FieldOptions y'1 y'2 y'3)- = FieldOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)+ mergeEmpty = FieldOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (FieldOptions x'1 x'2 x'3 x'4 x'5) (FieldOptions y'1 y'2 y'3 y'4 y'5)+ = FieldOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ (P'.mergeAppend x'5 y'5) instance P'.Default FieldOptions where- defaultValue = FieldOptions P'.defaultValue P'.defaultValue P'.defaultValue+ defaultValue = FieldOptions P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire FieldOptions where- wireSize ft' self'@(FieldOptions x'1 x'2 x'3)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ wireSize ft' self'@(FieldOptions x'1 x'2 x'3 x'4 x'5)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where- calc'Size = (P'.wireSizeOpt 1 14 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeUnknownField x'3)- wirePut ft' self'@(FieldOptions x'1 x'2 x'3)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ calc'Size+ = (P'.wireSizeOpt 1 14 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeRep 2 11 x'3 + P'.wireSizeExtField x'4 ++ P'.wireSizeUnknownField x'5)+ wirePut ft' self'@(FieldOptions x'1 x'2 x'3 x'4 x'5)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 8 14 x'1- P'.wirePutOpt 74 9 x'2- P'.wirePutUnknownField x'3+ = do+ P'.wirePutOpt 8 14 x'1+ P'.wirePutOpt 74 9 x'2+ P'.wirePutRep 7994 11 x'3+ P'.wirePutExtField x'4+ P'.wirePutUnknownField x'5 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith other'Field update'Self+ 11 -> P'.getMessageWith other'Field update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{ctype = P'.Just new'Field}) (P'.wireGet 14)- 9 -> P'.fmap (\ new'Field -> old'Self{experimental_map_key = P'.Just new'Field}) (P'.wireGet 9)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{ctype = P'.Just new'Field}) (P'.wireGet 14)+ 9 -> P'.fmap (\ new'Field -> old'Self{experimental_map_key = P'.Just new'Field}) (P'.wireGet 9)+ 999+ -> P'.fmap (\ new'Field -> old'Self{uninterpreted_option = P'.append (uninterpreted_option old'Self) new'Field})+ (P'.wireGet 11)+ _ -> P'.unknownField field'Number+ other'Field field'Number wire'Type old'Self+ = (if P'.or [1000 <= field'Number && field'Number <= 18999, 20000 <= field'Number] then P'.loadExtension else+ P'.loadUnknown)+ field'Number+ wire'Type+ old'Self instance P'.MessageAPI msg' (msg' -> FieldOptions) FieldOptions where getVal m' f' = f' m'@@ -61,5 +82,5 @@ instance P'.ReflectDescriptor FieldOptions where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FieldOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldOptions\", baseName = \"ctype\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldOptions\", baseName = \"CType\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FieldOptions\", baseName = \"experimental_map_key\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 74}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FieldOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FieldOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldOptions.ctype\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName' = FName \"ctype\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldOptions.CType\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName = MName \"CType\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldOptions.experimental_map_key\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName' = FName \"experimental_map_key\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 74}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FieldOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FieldOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/FieldOptions/CType.hs view
@@ -38,6 +38,6 @@ instance P'.ReflectEnum CType where reflectEnum = [(1, "CORD", CORD), (2, "STRING_PIECE", STRING_PIECE)] reflectEnumInfo _- = P'.EnumInfo (P'.ProtoName "Text" "DescriptorProtos.FieldOptions" "CType")- ["Text", "DescriptorProtos", "FieldOptions", "CType.hs"]- [(1, "CORD"), (2, "STRING_PIECE")]+ = P'.EnumInfo (P'.makePNF (P'.pack ".google.protobuf.FieldOptions.CType") ["Text"] ["DescriptorProtos", "FieldOptions"] "CType")+ ["Text", "DescriptorProtos", "FieldOptions", "CType.hs"]+ [(1, "CORD"), (2, "STRING_PIECE")]
Text/DescriptorProtos/FileDescriptorProto.hs view
@@ -22,76 +22,75 @@ instance P'.Mergeable FileDescriptorProto where mergeEmpty- = FileDescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty- P'.mergeEmpty- P'.mergeEmpty+ = FileDescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ P'.mergeEmpty+ P'.mergeEmpty mergeAppend (FileDescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9) (FileDescriptorProto y'1 y'2 y'3 y'4 y'5 y'6 y'7 y'8 y'9)- = FileDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)- (P'.mergeAppend x'5 y'5)- (P'.mergeAppend x'6 y'6)- (P'.mergeAppend x'7 y'7)- (P'.mergeAppend x'8 y'8)- (P'.mergeAppend x'9 y'9)+ = FileDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ (P'.mergeAppend x'5 y'5)+ (P'.mergeAppend x'6 y'6)+ (P'.mergeAppend x'7 y'7)+ (P'.mergeAppend x'8 y'8)+ (P'.mergeAppend x'9 y'9) instance P'.Default FileDescriptorProto where defaultValue- = FileDescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue- P'.defaultValue- P'.defaultValue- P'.defaultValue+ = FileDescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue+ P'.defaultValue+ P'.defaultValue+ P'.defaultValue instance P'.Wire FileDescriptorProto where wireSize ft' self'@(FileDescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size- = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeRep 1 9 x'3 + P'.wireSizeRep 1 11 x'4 +- P'.wireSizeRep 1 11 x'5- + P'.wireSizeRep 1 11 x'6- + P'.wireSizeRep 1 11 x'7- + P'.wireSizeOpt 1 11 x'8- + P'.wireSizeUnknownField x'9)+ = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeRep 1 9 x'3 + P'.wireSizeRep 1 11 x'4 ++ P'.wireSizeRep 1 11 x'5+ + P'.wireSizeRep 1 11 x'6+ + P'.wireSizeRep 1 11 x'7+ + P'.wireSizeOpt 1 11 x'8+ + P'.wireSizeUnknownField x'9) wirePut ft' self'@(FileDescriptorProto x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 10 9 x'1- P'.wirePutOpt 18 9 x'2- P'.wirePutRep 26 9 x'3- P'.wirePutRep 34 11 x'4- P'.wirePutRep 42 11 x'5- P'.wirePutRep 50 11 x'6- P'.wirePutRep 58 11 x'7- P'.wirePutOpt 66 11 x'8- P'.wirePutUnknownField x'9+ = do+ P'.wirePutOpt 10 9 x'1+ P'.wirePutOpt 18 9 x'2+ P'.wirePutRep 26 9 x'3+ P'.wirePutRep 34 11 x'4+ P'.wirePutRep 42 11 x'5+ P'.wirePutRep 50 11 x'6+ P'.wirePutRep 58 11 x'7+ P'.wirePutOpt 66 11 x'8+ P'.wirePutUnknownField x'9 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)- 2 -> P'.fmap (\ new'Field -> old'Self{package = P'.Just new'Field}) (P'.wireGet 9)- 3 -> P'.fmap (\ new'Field -> old'Self{dependency = P'.append (dependency old'Self) new'Field}) (P'.wireGet 9)- 4 -> P'.fmap (\ new'Field -> old'Self{message_type = P'.append (message_type old'Self) new'Field}) (P'.wireGet 11)- 5 -> P'.fmap (\ new'Field -> old'Self{enum_type = P'.append (enum_type old'Self) new'Field}) (P'.wireGet 11)- 6 -> P'.fmap (\ new'Field -> old'Self{service = P'.append (service old'Self) new'Field}) (P'.wireGet 11)- 7 -> P'.fmap (\ new'Field -> old'Self{extension = P'.append (extension old'Self) new'Field}) (P'.wireGet 11)- 8 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)})- (P'.wireGet 11)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)+ 2 -> P'.fmap (\ new'Field -> old'Self{package = P'.Just new'Field}) (P'.wireGet 9)+ 3 -> P'.fmap (\ new'Field -> old'Self{dependency = P'.append (dependency old'Self) new'Field}) (P'.wireGet 9)+ 4 -> P'.fmap (\ new'Field -> old'Self{message_type = P'.append (message_type old'Self) new'Field}) (P'.wireGet 11)+ 5 -> P'.fmap (\ new'Field -> old'Self{enum_type = P'.append (enum_type old'Self) new'Field}) (P'.wireGet 11)+ 6 -> P'.fmap (\ new'Field -> old'Self{service = P'.append (service old'Self) new'Field}) (P'.wireGet 11)+ 7 -> P'.fmap (\ new'Field -> old'Self{extension = P'.append (extension old'Self) new'Field}) (P'.wireGet 11)+ 8 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)}) (P'.wireGet 11)+ _ -> P'.unknownField field'Number instance P'.MessageAPI msg' (msg' -> FileDescriptorProto) FileDescriptorProto where getVal m' f' = f' m'@@ -100,5 +99,5 @@ instance P'.ReflectDescriptor FileDescriptorProto where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FileDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"package\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"dependency\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"message_type\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"DescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"enum_type\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"EnumDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"service\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"ServiceDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"extension\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FileOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FileDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.package\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"package\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.dependency\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"dependency\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.message_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"message_type\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.DescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"DescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.enum_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"enum_type\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.service\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"service\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.ServiceDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"ServiceDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.extension\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"extension\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FieldDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FieldDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FileOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
+ Text/DescriptorProtos/FileDescriptorSet.hs view
@@ -0,0 +1,62 @@+module Text.DescriptorProtos.FileDescriptorSet (FileDescriptorSet(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.FileDescriptorProto as DescriptorProtos (FileDescriptorProto)+ +data FileDescriptorSet = FileDescriptorSet{file :: P'.Seq DescriptorProtos.FileDescriptorProto, unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage FileDescriptorSet where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +instance P'.Mergeable FileDescriptorSet where+ mergeEmpty = FileDescriptorSet P'.mergeEmpty P'.mergeEmpty+ mergeAppend (FileDescriptorSet x'1 x'2) (FileDescriptorSet y'1 y'2)+ = FileDescriptorSet (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)+ +instance P'.Default FileDescriptorSet where+ defaultValue = FileDescriptorSet P'.defaultValue P'.defaultValue+ +instance P'.Wire FileDescriptorSet where+ wireSize ft' self'@(FileDescriptorSet x'1 x'2)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self'+ where+ calc'Size = (P'.wireSizeRep 1 11 x'1 + P'.wireSizeUnknownField x'2)+ wirePut ft' self'@(FileDescriptorSet x'1 x'2)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self'+ where+ put'Fields+ = do+ P'.wirePutRep 10 11 x'1+ P'.wirePutUnknownField x'2+ wireGet ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft'+ where+ update'Self field'Number old'Self+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{file = P'.append (file old'Self) new'Field}) (P'.wireGet 11)+ _ -> P'.unknownField field'Number+ +instance P'.MessageAPI msg' (msg' -> FileDescriptorSet) FileDescriptorSet where+ getVal m' f' = f' m'+ +instance P'.GPB FileDescriptorSet+ +instance P'.ReflectDescriptor FileDescriptorSet where+ reflectDescriptorInfo _+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FileDescriptorSet\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileDescriptorSet\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileDescriptorSet.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileDescriptorSet.file\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileDescriptorSet\"], baseName' = FName \"file\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FileDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/FileOptions.hs view
@@ -1,66 +1,91 @@ module Text.DescriptorProtos.FileOptions (FileOptions(..)) where-import Prelude ((+))+import Prelude ((+), (<=), (&&), ( || )) import qualified Prelude as P' import qualified Text.ProtocolBuffers.Header as P' import qualified Text.DescriptorProtos.FileOptions.OptimizeMode as DescriptorProtos.FileOptions (OptimizeMode)+import qualified Text.DescriptorProtos.UninterpretedOption as DescriptorProtos (UninterpretedOption) data FileOptions = FileOptions{java_package :: P'.Maybe P'.Utf8, java_outer_classname :: P'.Maybe P'.Utf8, java_multiple_files :: P'.Maybe P'.Bool,- optimize_for :: P'.Maybe DescriptorProtos.FileOptions.OptimizeMode, unknown'field :: P'.UnknownField}+ optimize_for :: P'.Maybe DescriptorProtos.FileOptions.OptimizeMode,+ uninterpreted_option :: P'.Seq DescriptorProtos.UninterpretedOption, ext'field :: P'.ExtField,+ unknown'field :: P'.UnknownField} deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable) +instance P'.ExtendMessage FileOptions where+ getExtField = ext'field+ putExtField e'f msg = msg{ext'field = e'f}+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)+ instance P'.UnknownMessage FileOptions where getUnknownField = unknown'field putUnknownField u'f msg = msg{unknown'field = u'f} instance P'.Mergeable FileOptions where- mergeEmpty = FileOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty- mergeAppend (FileOptions x'1 x'2 x'3 x'4 x'5) (FileOptions y'1 y'2 y'3 y'4 y'5)- = FileOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)- (P'.mergeAppend x'5 y'5)+ mergeEmpty = FileOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (FileOptions x'1 x'2 x'3 x'4 x'5 x'6 x'7) (FileOptions y'1 y'2 y'3 y'4 y'5 y'6 y'7)+ = FileOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ (P'.mergeAppend x'5 y'5)+ (P'.mergeAppend x'6 y'6)+ (P'.mergeAppend x'7 y'7) instance P'.Default FileOptions where- defaultValue = FileOptions P'.defaultValue P'.defaultValue (P'.Just P'.False) (P'.Just (P'.read "CODE_SIZE")) P'.defaultValue+ defaultValue+ = FileOptions P'.defaultValue P'.defaultValue (P'.Just P'.False) (P'.Just (P'.read "CODE_SIZE")) P'.defaultValue P'.defaultValue+ P'.defaultValue instance P'.Wire FileOptions where- wireSize ft' self'@(FileOptions x'1 x'2 x'3 x'4 x'5)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ wireSize ft' self'@(FileOptions x'1 x'2 x'3 x'4 x'5 x'6 x'7)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size- = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 8 x'3 + P'.wireSizeOpt 1 14 x'4 +- P'.wireSizeUnknownField x'5)- wirePut ft' self'@(FileOptions x'1 x'2 x'3 x'4 x'5)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 8 x'3 + P'.wireSizeOpt 1 14 x'4 ++ P'.wireSizeRep 2 11 x'5+ + P'.wireSizeExtField x'6+ + P'.wireSizeUnknownField x'7)+ wirePut ft' self'@(FileOptions x'1 x'2 x'3 x'4 x'5 x'6 x'7)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 10 9 x'1- P'.wirePutOpt 66 9 x'2- P'.wirePutOpt 72 14 x'4- P'.wirePutOpt 80 8 x'3- P'.wirePutUnknownField x'5+ = do+ P'.wirePutOpt 10 9 x'1+ P'.wirePutOpt 66 9 x'2+ P'.wirePutOpt 72 14 x'4+ P'.wirePutOpt 80 8 x'3+ P'.wirePutRep 7994 11 x'5+ P'.wirePutExtField x'6+ P'.wirePutUnknownField x'7 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith other'Field update'Self+ 11 -> P'.getMessageWith other'Field update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{java_package = P'.Just new'Field}) (P'.wireGet 9)- 8 -> P'.fmap (\ new'Field -> old'Self{java_outer_classname = P'.Just new'Field}) (P'.wireGet 9)- 10 -> P'.fmap (\ new'Field -> old'Self{java_multiple_files = P'.Just new'Field}) (P'.wireGet 8)- 9 -> P'.fmap (\ new'Field -> old'Self{optimize_for = P'.Just new'Field}) (P'.wireGet 14)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{java_package = P'.Just new'Field}) (P'.wireGet 9)+ 8 -> P'.fmap (\ new'Field -> old'Self{java_outer_classname = P'.Just new'Field}) (P'.wireGet 9)+ 10 -> P'.fmap (\ new'Field -> old'Self{java_multiple_files = P'.Just new'Field}) (P'.wireGet 8)+ 9 -> P'.fmap (\ new'Field -> old'Self{optimize_for = P'.Just new'Field}) (P'.wireGet 14)+ 999+ -> P'.fmap (\ new'Field -> old'Self{uninterpreted_option = P'.append (uninterpreted_option old'Self) new'Field})+ (P'.wireGet 11)+ _ -> P'.unknownField field'Number+ other'Field field'Number wire'Type old'Self+ = (if P'.or [1000 <= field'Number && field'Number <= 18999, 20000 <= field'Number] then P'.loadExtension else+ P'.loadUnknown)+ field'Number+ wire'Type+ old'Self instance P'.MessageAPI msg' (msg' -> FileOptions) FileOptions where getVal m' f' = f' m'@@ -69,5 +94,5 @@ instance P'.ReflectDescriptor FileOptions where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"FileOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"java_package\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"java_outer_classname\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"java_multiple_files\"}, fieldNumber = FieldId {getFieldId = 10}, wireTag = WireTag {getWireTag = 80}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just (Chunk \"false\" Empty), hsDefault = Just (HsDef'Bool False)},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"optimize_for\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 72}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.FileOptions\", baseName = \"OptimizeMode\"}), hsRawDefault = Just (Chunk \"CODE_SIZE\" Empty), hsDefault = Just (HsDef'Enum \"CODE_SIZE\")}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.FileOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"FileOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"FileOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.java_package\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"java_package\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.java_outer_classname\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"java_outer_classname\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.java_multiple_files\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"java_multiple_files\"}, fieldNumber = FieldId {getFieldId = 10}, wireTag = WireTag {getWireTag = 80}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just (Chunk \"false\" Empty), hsDefault = Just (HsDef'Bool False)},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.optimize_for\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"optimize_for\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 72}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.FileOptions.OptimizeMode\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName = MName \"OptimizeMode\"}), hsRawDefault = Just (Chunk \"CODE_SIZE\" Empty), hsDefault = Just (HsDef'Enum \"CODE_SIZE\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.FileOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"FileOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/FileOptions/OptimizeMode.hs view
@@ -38,6 +38,7 @@ instance P'.ReflectEnum OptimizeMode where reflectEnum = [(1, "SPEED", SPEED), (2, "CODE_SIZE", CODE_SIZE)] reflectEnumInfo _- = P'.EnumInfo (P'.ProtoName "Text" "DescriptorProtos.FileOptions" "OptimizeMode")- ["Text", "DescriptorProtos", "FileOptions", "OptimizeMode.hs"]- [(1, "SPEED"), (2, "CODE_SIZE")]+ = P'.EnumInfo+ (P'.makePNF (P'.pack ".google.protobuf.FileOptions.OptimizeMode") ["Text"] ["DescriptorProtos", "FileOptions"] "OptimizeMode")+ ["Text", "DescriptorProtos", "FileOptions", "OptimizeMode.hs"]+ [(1, "SPEED"), (2, "CODE_SIZE")]
Text/DescriptorProtos/MessageOptions.hs view
@@ -1,53 +1,73 @@ module Text.DescriptorProtos.MessageOptions (MessageOptions(..)) where-import Prelude ((+))+import Prelude ((+), (<=), (&&), ( || )) import qualified Prelude as P' import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.UninterpretedOption as DescriptorProtos (UninterpretedOption) -data MessageOptions = MessageOptions{message_set_wire_format :: P'.Maybe P'.Bool, unknown'field :: P'.UnknownField}+data MessageOptions = MessageOptions{message_set_wire_format :: P'.Maybe P'.Bool,+ uninterpreted_option :: P'.Seq DescriptorProtos.UninterpretedOption, ext'field :: P'.ExtField,+ unknown'field :: P'.UnknownField} deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable) +instance P'.ExtendMessage MessageOptions where+ getExtField = ext'field+ putExtField e'f msg = msg{ext'field = e'f}+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)+ instance P'.UnknownMessage MessageOptions where getUnknownField = unknown'field putUnknownField u'f msg = msg{unknown'field = u'f} instance P'.Mergeable MessageOptions where- mergeEmpty = MessageOptions P'.mergeEmpty P'.mergeEmpty- mergeAppend (MessageOptions x'1 x'2) (MessageOptions y'1 y'2) = MessageOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)+ mergeEmpty = MessageOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (MessageOptions x'1 x'2 x'3 x'4) (MessageOptions y'1 y'2 y'3 y'4)+ = MessageOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4) instance P'.Default MessageOptions where- defaultValue = MessageOptions (P'.Just P'.False) P'.defaultValue+ defaultValue = MessageOptions (P'.Just P'.False) P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire MessageOptions where- wireSize ft' self'@(MessageOptions x'1 x'2)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ wireSize ft' self'@(MessageOptions x'1 x'2 x'3 x'4)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where- calc'Size = (P'.wireSizeOpt 1 8 x'1 + P'.wireSizeUnknownField x'2)- wirePut ft' self'@(MessageOptions x'1 x'2)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ calc'Size = (P'.wireSizeOpt 1 8 x'1 + P'.wireSizeRep 2 11 x'2 + P'.wireSizeExtField x'3 + P'.wireSizeUnknownField x'4)+ wirePut ft' self'@(MessageOptions x'1 x'2 x'3 x'4)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 8 8 x'1- P'.wirePutUnknownField x'2+ = do+ P'.wirePutOpt 8 8 x'1+ P'.wirePutRep 7994 11 x'2+ P'.wirePutExtField x'3+ P'.wirePutUnknownField x'4 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith other'Field update'Self+ 11 -> P'.getMessageWith other'Field update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{message_set_wire_format = P'.Just new'Field}) (P'.wireGet 8)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{message_set_wire_format = P'.Just new'Field}) (P'.wireGet 8)+ 999+ -> P'.fmap (\ new'Field -> old'Self{uninterpreted_option = P'.append (uninterpreted_option old'Self) new'Field})+ (P'.wireGet 11)+ _ -> P'.unknownField field'Number+ other'Field field'Number wire'Type old'Self+ = (if P'.or [1000 <= field'Number && field'Number <= 18999, 20000 <= field'Number] then P'.loadExtension else+ P'.loadUnknown)+ field'Number+ wire'Type+ old'Self instance P'.MessageAPI msg' (msg' -> MessageOptions) MessageOptions where getVal m' f' = f' m'@@ -56,5 +76,5 @@ instance P'.ReflectDescriptor MessageOptions where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MessageOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MessageOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MessageOptions\", baseName = \"message_set_wire_format\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just (Chunk \"false\" Empty), hsDefault = Just (HsDef'Bool False)}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.MessageOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MessageOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MessageOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MessageOptions.message_set_wire_format\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MessageOptions\"], baseName' = FName \"message_set_wire_format\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just (Chunk \"false\" Empty), hsDefault = Just (HsDef'Bool False)},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MessageOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MessageOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/MethodDescriptorProto.hs view
@@ -17,52 +17,51 @@ instance P'.Mergeable MethodDescriptorProto where mergeEmpty = MethodDescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty mergeAppend (MethodDescriptorProto x'1 x'2 x'3 x'4 x'5) (MethodDescriptorProto y'1 y'2 y'3 y'4 y'5)- = MethodDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)- (P'.mergeAppend x'5 y'5)+ = MethodDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ (P'.mergeAppend x'5 y'5) instance P'.Default MethodDescriptorProto where defaultValue = MethodDescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire MethodDescriptorProto where wireSize ft' self'@(MethodDescriptorProto x'1 x'2 x'3 x'4 x'5)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size- = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 9 x'3 + P'.wireSizeOpt 1 11 x'4 +- P'.wireSizeUnknownField x'5)+ = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 9 x'3 + P'.wireSizeOpt 1 11 x'4 ++ P'.wireSizeUnknownField x'5) wirePut ft' self'@(MethodDescriptorProto x'1 x'2 x'3 x'4 x'5)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 10 9 x'1- P'.wirePutOpt 18 9 x'2- P'.wirePutOpt 26 9 x'3- P'.wirePutOpt 34 11 x'4- P'.wirePutUnknownField x'5+ = do+ P'.wirePutOpt 10 9 x'1+ P'.wirePutOpt 18 9 x'2+ P'.wirePutOpt 26 9 x'3+ P'.wirePutOpt 34 11 x'4+ P'.wirePutUnknownField x'5 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)- 2 -> P'.fmap (\ new'Field -> old'Self{input_type = P'.Just new'Field}) (P'.wireGet 9)- 3 -> P'.fmap (\ new'Field -> old'Self{output_type = P'.Just new'Field}) (P'.wireGet 9)- 4 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)})- (P'.wireGet 11)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)+ 2 -> P'.fmap (\ new'Field -> old'Self{input_type = P'.Just new'Field}) (P'.wireGet 9)+ 3 -> P'.fmap (\ new'Field -> old'Self{output_type = P'.Just new'Field}) (P'.wireGet 9)+ 4 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)}) (P'.wireGet 11)+ _ -> P'.unknownField field'Number instance P'.MessageAPI msg' (msg' -> MethodDescriptorProto) MethodDescriptorProto where getVal m' f' = f' m'@@ -71,5 +70,5 @@ instance P'.ReflectDescriptor MethodDescriptorProto where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MethodDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MethodDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MethodDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MethodDescriptorProto\", baseName = \"input_type\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MethodDescriptorProto\", baseName = \"output_type\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.MethodDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MethodOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.MethodDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MethodDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MethodDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodDescriptorProto.input_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodDescriptorProto\"], baseName' = FName \"input_type\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodDescriptorProto.output_type\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodDescriptorProto\"], baseName' = FName \"output_type\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.MethodOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MethodOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/MethodOptions.hs view
@@ -1,51 +1,70 @@ module Text.DescriptorProtos.MethodOptions (MethodOptions(..)) where-import Prelude ((+))+import Prelude ((+), (<=), (&&), ( || )) import qualified Prelude as P' import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.UninterpretedOption as DescriptorProtos (UninterpretedOption) -data MethodOptions = MethodOptions{unknown'field :: P'.UnknownField}+data MethodOptions = MethodOptions{uninterpreted_option :: P'.Seq DescriptorProtos.UninterpretedOption, ext'field :: P'.ExtField,+ unknown'field :: P'.UnknownField} deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable) +instance P'.ExtendMessage MethodOptions where+ getExtField = ext'field+ putExtField e'f msg = msg{ext'field = e'f}+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)+ instance P'.UnknownMessage MethodOptions where getUnknownField = unknown'field putUnknownField u'f msg = msg{unknown'field = u'f} instance P'.Mergeable MethodOptions where- mergeEmpty = MethodOptions P'.mergeEmpty- mergeAppend (MethodOptions x'1) (MethodOptions y'1) = MethodOptions (P'.mergeAppend x'1 y'1)+ mergeEmpty = MethodOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (MethodOptions x'1 x'2 x'3) (MethodOptions y'1 y'2 y'3)+ = MethodOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) instance P'.Default MethodOptions where- defaultValue = MethodOptions P'.defaultValue+ defaultValue = MethodOptions P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire MethodOptions where- wireSize ft' self'@(MethodOptions x'1)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ wireSize ft' self'@(MethodOptions x'1 x'2 x'3)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where- calc'Size = (P'.wireSizeUnknownField x'1)- wirePut ft' self'@(MethodOptions x'1)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ calc'Size = (P'.wireSizeRep 2 11 x'1 + P'.wireSizeExtField x'2 + P'.wireSizeUnknownField x'3)+ wirePut ft' self'@(MethodOptions x'1 x'2 x'3)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.return ()+ = do+ P'.wirePutRep 7994 11 x'1+ P'.wirePutExtField x'2+ P'.wirePutUnknownField x'3 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith other'Field update'Self+ 11 -> P'.getMessageWith other'Field update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- _ -> P'.unknownField field'Number+ = case field'Number of+ 999+ -> P'.fmap (\ new'Field -> old'Self{uninterpreted_option = P'.append (uninterpreted_option old'Self) new'Field})+ (P'.wireGet 11)+ _ -> P'.unknownField field'Number+ other'Field field'Number wire'Type old'Self+ = (if P'.or [1000 <= field'Number && field'Number <= 18999, 20000 <= field'Number] then P'.loadExtension else+ P'.loadUnknown)+ field'Number+ wire'Type+ old'Self instance P'.MessageAPI msg' (msg' -> MethodOptions) MethodOptions where getVal m' f' = f' m'@@ -54,5 +73,5 @@ instance P'.ReflectDescriptor MethodOptions where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MethodOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MethodOptions.hs\"], isGroup = False, fields = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.MethodOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MethodOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"MethodOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.MethodOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"MethodOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True}"
+ Text/DescriptorProtos/Options.hs view
@@ -0,0 +1,207 @@+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-}+{-| This module provides a less verbose API for accessing the options+ of the various descriptor messages types. There are seven+ different option types. The EnumValueOptions are not currently+ settable in the proto file. To access extension keys the+ descendKey functions are provided as the descend functions ignore+ them. The 'toDP', 'toEP', 'toSP' are type-specific descents that+ are demonstrated in the the tests below. They are useful in that+ they provide more information for the type-checker. The 'toFP',+ 'toEVP', and 'toMP' are fully type-specific descents but are+ needed to make the tests below type-check, though they could have+ been used in 'test4', test5', and 'test7'.++@+import Text.DescriptorProtos.Options+import Text.DescriptorProtos(fileDescriptorProto)++test1 :: D.FileOptions+test1 = options fileDescriptorProto++test2 :: Maybe D.MessageOptions+test2 = return fileDescriptorProto >>= descend "FieldDescriptorProto" >>= return . options++test3 :: Maybe D.EnumOptions+test3 = return fileDescriptorProto >>= toDP "FieldDescriptorProto" >>= descend "Type" >>= return . options++test4 :: Maybe D.EnumValueOptions+test4 = return fileDescriptorProto >>= toDP "FieldDescriptorProto" >>= toEP "Type" >>= descend "TYPE_DOUBLE" >>= return . options++test5 :: Maybe D.FieldOptions+test5 = return fileDescriptorProto >>= toDP "DescriptorProto" >>= toDP "ExtensionRange" >>= descend "start" >>= return . options++test6 :: Maybe D.ServiceOptions+test6 = return fileDescriptorProto >>= descend "ImaginaryService" >>= return . options++test7 :: Maybe D.MethodOptions+test7 = return fileDescriptorProto >>= toSP "ImaginaryService" >>= descend "ImaginaryMethod" >>= return . options+@+|-}+module Text.DescriptorProtos.Options(name,options,descend',descend,descendKey',descendKey+ ,toDP,toEP,toSP,toFP,toEVP,toMP+ ,NameAndOptions,DescendClass,DescendKey+ ,D.FileDescriptorProto,D.DescriptorProto,D.EnumDescriptorProto+ ,D.EnumValueDescriptorProto,D.FieldDescriptorProto+ ,D.ServiceDescriptorProto,D.MethodDescriptorProto+ ,D.EnumOptions,D.EnumValueOptions,D.FieldOptions+ ,D.FileOptions,D.MessageOptions,D.MethodOptions,D.ServiceOptions) where++import qualified Text.DescriptorProtos.DescriptorProto as D(DescriptorProto)+import qualified Text.DescriptorProtos.DescriptorProto as D.DescriptorProto(DescriptorProto(..))+import qualified Text.DescriptorProtos.DescriptorProto.ExtensionRange as D(ExtensionRange(ExtensionRange))+import qualified Text.DescriptorProtos.DescriptorProto.ExtensionRange as D.ExtensionRange(ExtensionRange(..))+import qualified Text.DescriptorProtos.EnumDescriptorProto as D(EnumDescriptorProto(EnumDescriptorProto))+import qualified Text.DescriptorProtos.EnumDescriptorProto as D.EnumDescriptorProto(EnumDescriptorProto(..))+import qualified Text.DescriptorProtos.EnumValueDescriptorProto as D(EnumValueDescriptorProto)+import qualified Text.DescriptorProtos.EnumValueDescriptorProto as D.EnumValueDescriptorProto(EnumValueDescriptorProto(..))+import qualified Text.DescriptorProtos.FieldDescriptorProto as D(FieldDescriptorProto)+import qualified Text.DescriptorProtos.FieldDescriptorProto as D.FieldDescriptorProto(FieldDescriptorProto(..))+import qualified Text.DescriptorProtos.FieldDescriptorProto.Type as D(Type)+import Text.DescriptorProtos.FieldDescriptorProto.Type as D.Type(Type(..))+import qualified Text.DescriptorProtos.FileDescriptorProto as D(FileDescriptorProto)+import qualified Text.DescriptorProtos.FileDescriptorProto as D.FileDescriptorProto(FileDescriptorProto(..))+import qualified Text.DescriptorProtos.MethodDescriptorProto as D(MethodDescriptorProto)+import qualified Text.DescriptorProtos.MethodDescriptorProto as D.MethodDescriptorProto(MethodDescriptorProto(..))+import qualified Text.DescriptorProtos.ServiceDescriptorProto as D(ServiceDescriptorProto)+import qualified Text.DescriptorProtos.ServiceDescriptorProto as D.ServiceDescriptorProto(ServiceDescriptorProto(..))+import qualified Text.DescriptorProtos.UninterpretedOption as D(UninterpretedOption)+import qualified Text.DescriptorProtos.UninterpretedOption as D.UninterpretedOption(UninterpretedOption(..))+import qualified Text.DescriptorProtos.UninterpretedOption.NamePart as D(NamePart(NamePart))+import qualified Text.DescriptorProtos.UninterpretedOption.NamePart as D.NamePart(NamePart(..))+import qualified Text.DescriptorProtos.EnumOptions as D(EnumOptions)+import qualified Text.DescriptorProtos.EnumOptions as D.EnumOptions(EnumOptions(..))+import qualified Text.DescriptorProtos.EnumValueOptions as D(EnumValueOptions)+import qualified Text.DescriptorProtos.EnumValueOptions as D.EnumValueOptions(EnumValueOptions(..))+import qualified Text.DescriptorProtos.FieldOptions as D(FieldOptions)+import qualified Text.DescriptorProtos.FieldOptions as D.FieldOptions(FieldOptions(..))+import qualified Text.DescriptorProtos.FileOptions as D(FileOptions)+import qualified Text.DescriptorProtos.FileOptions as D.FileOptions(FileOptions(..))+import qualified Text.DescriptorProtos.MessageOptions as D(MessageOptions)+import qualified Text.DescriptorProtos.MessageOptions as D.MessageOptions(MessageOptions(..))+import qualified Text.DescriptorProtos.MethodOptions as D(MethodOptions)+import qualified Text.DescriptorProtos.MethodOptions as D.MethodOptions(MethodOptions(..))+import qualified Text.DescriptorProtos.ServiceOptions as D(ServiceOptions)+import qualified Text.DescriptorProtos.ServiceOptions as D.ServiceOptions(ServiceOptions(..))++import Text.DescriptorProtos(fileDescriptorProto) -- for testing++import Data.Maybe(listToMaybe)+import Text.ProtocolBuffers(fromString,Utf8,getVal,Seq)+import qualified Data.Foldable as F(toList)++class DescendClass a c where+ descend' :: a -> Utf8 -> (Maybe c)++descend :: DescendClass a c => String -> a -> Maybe c+descend = flip descend' . fromString++class DescendKey a where+ descendKey' :: a -> Utf8 -> Maybe D.FieldDescriptorProto++descendKey :: DescendKey a => String -> a -> Maybe D.FieldDescriptorProto+descendKey = flip descendKey' . fromString++class NameAndOptions a opt | a -> opt, opt -> a where+ name :: a -> Utf8+ options :: a -> opt++-- helper+search :: (NameAndOptions a b) => Seq a -> Utf8 -> Maybe a+search s n = listToMaybe [ m | m <- F.toList s, n == name m ]++instance DescendClass D.DescriptorProto D.DescriptorProto where+ descend' dp = search (D.DescriptorProto.nested_type dp)++instance DescendClass D.DescriptorProto D.EnumDescriptorProto where+ descend' dp = search (D.DescriptorProto.enum_type dp)++instance DescendClass D.DescriptorProto D.FieldDescriptorProto where+ descend' dp = search (D.DescriptorProto.field dp)++instance DescendClass D.FileDescriptorProto D.DescriptorProto where+ descend' dp = search (D.FileDescriptorProto.message_type dp)++instance DescendClass D.FileDescriptorProto D.EnumDescriptorProto where+ descend' dp = search (D.FileDescriptorProto.enum_type dp)++instance DescendClass D.FileDescriptorProto D.ServiceDescriptorProto where+ descend' dp = search (D.FileDescriptorProto.service dp)++instance DescendClass D.EnumDescriptorProto D.EnumValueDescriptorProto where+ descend' dp = search (D.EnumDescriptorProto.value dp)++instance DescendClass D.ServiceDescriptorProto D.MethodDescriptorProto where+ descend' dp = search (D.ServiceDescriptorProto.method dp)++instance DescendKey D.FileDescriptorProto where+ descendKey' dp = search (D.FileDescriptorProto.extension dp)++instance DescendKey D.DescriptorProto where+ descendKey' dp = search (D.DescriptorProto.extension dp)++instance NameAndOptions D.FileDescriptorProto D.FileOptions where+ name = flip getVal D.FileDescriptorProto.name+ options = flip getVal D.FileDescriptorProto.options++instance NameAndOptions D.DescriptorProto D.MessageOptions where+ name = flip getVal D.DescriptorProto.name+ options = flip getVal D.DescriptorProto.options++instance NameAndOptions D.FieldDescriptorProto D.FieldOptions where+ name = flip getVal D.FieldDescriptorProto.name+ options = flip getVal D.FieldDescriptorProto.options++instance NameAndOptions D.ServiceDescriptorProto D.ServiceOptions where+ name = flip getVal D.ServiceDescriptorProto.name+ options = flip getVal D.ServiceDescriptorProto.options++instance NameAndOptions D.MethodDescriptorProto D.MethodOptions where+ name = flip getVal D.MethodDescriptorProto.name+ options = flip getVal D.MethodDescriptorProto.options++instance NameAndOptions D.EnumValueDescriptorProto D.EnumValueOptions where+ name = flip getVal D.EnumValueDescriptorProto.name+ options = flip getVal D.EnumValueDescriptorProto.options++instance NameAndOptions D.EnumDescriptorProto D.EnumOptions where+ name = flip getVal D.EnumDescriptorProto.name+ options = flip getVal D.EnumDescriptorProto.options++toDP :: DescendClass a D.DescriptorProto => String -> a -> Maybe D.DescriptorProto+toDP s a = descend' a (fromString s)++toEP :: DescendClass a D.EnumDescriptorProto => String -> a -> Maybe D.EnumDescriptorProto+toEP s a = descend' a (fromString s)++toSP :: String -> D.FileDescriptorProto -> Maybe D.ServiceDescriptorProto+toSP s a = descend' a (fromString s)++toFP :: String -> D.DescriptorProto -> Maybe D.FieldDescriptorProto+toFP s a = descend' a (fromString s)++toEVP :: String -> D.EnumDescriptorProto -> Maybe D.EnumValueDescriptorProto+toEVP s a = descend' a (fromString s)++toMP :: String -> D.ServiceDescriptorProto -> Maybe D.MethodDescriptorProto+toMP s a = descend' a (fromString s)++test1 :: D.FileOptions+test1 = options fileDescriptorProto++test2 :: Maybe D.MessageOptions+test2 = return fileDescriptorProto >>= descend "FieldDescriptorProto" >>= return . options++test3 :: Maybe D.EnumOptions+test3 = return fileDescriptorProto >>= toDP "FieldDescriptorProto" >>= descend "Type" >>= return . options++test4 :: Maybe D.EnumValueOptions+test4 = return fileDescriptorProto >>= toDP "FieldDescriptorProto" >>= toEP "Type" >>= descend "TYPE_DOUBLE" >>= return . options++test5 :: Maybe D.FieldOptions+test5 = return fileDescriptorProto >>= toDP "DescriptorProto" >>= toDP "ExtensionRange" >>= descend "start" >>= return . options++test6 :: Maybe D.ServiceOptions+test6 = return fileDescriptorProto >>= descend "ImaginaryService" >>= return . options++test7 :: Maybe D.MethodOptions+test7 = return fileDescriptorProto >>= toSP "ImaginaryService" >>= descend "ImaginaryMethod" >>= return . options
Text/DescriptorProtos/ServiceDescriptorProto.hs view
@@ -18,47 +18,46 @@ instance P'.Mergeable ServiceDescriptorProto where mergeEmpty = ServiceDescriptorProto P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty mergeAppend (ServiceDescriptorProto x'1 x'2 x'3 x'4) (ServiceDescriptorProto y'1 y'2 y'3 y'4)- = ServiceDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ = ServiceDescriptorProto (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4) instance P'.Default ServiceDescriptorProto where defaultValue = ServiceDescriptorProto P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire ServiceDescriptorProto where wireSize ft' self'@(ServiceDescriptorProto x'1 x'2 x'3 x'4)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where calc'Size = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeRep 1 11 x'2 + P'.wireSizeOpt 1 11 x'3 + P'.wireSizeUnknownField x'4) wirePut ft' self'@(ServiceDescriptorProto x'1 x'2 x'3 x'4)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.wirePutOpt 10 9 x'1- P'.wirePutRep 18 11 x'2- P'.wirePutOpt 26 11 x'3- P'.wirePutUnknownField x'4+ = do+ P'.wirePutOpt 10 9 x'1+ P'.wirePutRep 18 11 x'2+ P'.wirePutOpt 26 11 x'3+ P'.wirePutUnknownField x'4 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)- 2 -> P'.fmap (\ new'Field -> old'Self{method = P'.append (method old'Self) new'Field}) (P'.wireGet 11)- 3 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)})- (P'.wireGet 11)- _ -> P'.unknownField field'Number+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{name = P'.Just new'Field}) (P'.wireGet 9)+ 2 -> P'.fmap (\ new'Field -> old'Self{method = P'.append (method old'Self) new'Field}) (P'.wireGet 11)+ 3 -> P'.fmap (\ new'Field -> old'Self{options = P'.mergeAppend (options old'Self) (P'.Just new'Field)}) (P'.wireGet 11)+ _ -> P'.unknownField field'Number instance P'.MessageAPI msg' (msg' -> ServiceDescriptorProto) ServiceDescriptorProto where getVal m' f' = f' m'@@ -67,5 +66,5 @@ instance P'.ReflectDescriptor ServiceDescriptorProto where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"ServiceDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"ServiceDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.ServiceDescriptorProto\", baseName = \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.ServiceDescriptorProto\", baseName = \"method\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"MethodDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos.ServiceDescriptorProto\", baseName = \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"ServiceOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.ServiceDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"ServiceDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"ServiceDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.ServiceDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"ServiceDescriptorProto\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.ServiceDescriptorProto.method\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"ServiceDescriptorProto\"], baseName' = FName \"method\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.MethodDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"MethodDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.ServiceDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"ServiceDescriptorProto\"], baseName' = FName \"options\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.ServiceOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"ServiceOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
Text/DescriptorProtos/ServiceOptions.hs view
@@ -1,51 +1,70 @@ module Text.DescriptorProtos.ServiceOptions (ServiceOptions(..)) where-import Prelude ((+))+import Prelude ((+), (<=), (&&), ( || )) import qualified Prelude as P' import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.UninterpretedOption as DescriptorProtos (UninterpretedOption) -data ServiceOptions = ServiceOptions{unknown'field :: P'.UnknownField}+data ServiceOptions = ServiceOptions{uninterpreted_option :: P'.Seq DescriptorProtos.UninterpretedOption, ext'field :: P'.ExtField,+ unknown'field :: P'.UnknownField} deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable) +instance P'.ExtendMessage ServiceOptions where+ getExtField = ext'field+ putExtField e'f msg = msg{ext'field = e'f}+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)+ instance P'.UnknownMessage ServiceOptions where getUnknownField = unknown'field putUnknownField u'f msg = msg{unknown'field = u'f} instance P'.Mergeable ServiceOptions where- mergeEmpty = ServiceOptions P'.mergeEmpty- mergeAppend (ServiceOptions x'1) (ServiceOptions y'1) = ServiceOptions (P'.mergeAppend x'1 y'1)+ mergeEmpty = ServiceOptions P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (ServiceOptions x'1 x'2 x'3) (ServiceOptions y'1 y'2 y'3)+ = ServiceOptions (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) instance P'.Default ServiceOptions where- defaultValue = ServiceOptions P'.defaultValue+ defaultValue = ServiceOptions P'.defaultValue P'.defaultValue P'.defaultValue instance P'.Wire ServiceOptions where- wireSize ft' self'@(ServiceOptions x'1)- = case ft' of- 10 -> calc'Size- 11 -> P'.prependMessageSize calc'Size- _ -> P'.wireSizeErr ft' self'+ wireSize ft' self'@(ServiceOptions x'1 x'2 x'3)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self' where- calc'Size = (P'.wireSizeUnknownField x'1)- wirePut ft' self'@(ServiceOptions x'1)- = case ft' of- 10 -> put'Fields- 11- -> do- P'.putSize (P'.wireSize 10 self')- put'Fields- _ -> P'.wirePutErr ft' self'+ calc'Size = (P'.wireSizeRep 2 11 x'1 + P'.wireSizeExtField x'2 + P'.wireSizeUnknownField x'3)+ wirePut ft' self'@(ServiceOptions x'1 x'2 x'3)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self' where put'Fields- = do- P'.return ()+ = do+ P'.wirePutRep 7994 11 x'1+ P'.wirePutExtField x'2+ P'.wirePutUnknownField x'3 wireGet ft'- = case ft' of- 10 -> P'.getBareMessageWith P'.loadUnknown update'Self- 11 -> P'.getMessageWith P'.loadUnknown update'Self- _ -> P'.wireGetErr ft'+ = case ft' of+ 10 -> P'.getBareMessageWith other'Field update'Self+ 11 -> P'.getMessageWith other'Field update'Self+ _ -> P'.wireGetErr ft' where update'Self field'Number old'Self- = case field'Number of- _ -> P'.unknownField field'Number+ = case field'Number of+ 999+ -> P'.fmap (\ new'Field -> old'Self{uninterpreted_option = P'.append (uninterpreted_option old'Self) new'Field})+ (P'.wireGet 11)+ _ -> P'.unknownField field'Number+ other'Field field'Number wire'Type old'Self+ = (if P'.or [1000 <= field'Number && field'Number <= 18999, 20000 <= field'Number] then P'.loadExtension else+ P'.loadUnknown)+ field'Number+ wire'Type+ old'Self instance P'.MessageAPI msg' (msg' -> ServiceOptions) ServiceOptions where getVal m' f' = f' m'@@ -54,5 +73,5 @@ instance P'.ReflectDescriptor ServiceOptions where reflectDescriptorInfo _- = P'.read- "DescriptorInfo {descName = ProtoName {haskellPrefix = \"Text\", parentModule = \"DescriptorProtos\", baseName = \"ServiceOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"ServiceOptions.hs\"], isGroup = False, fields = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.ServiceOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"ServiceOptions\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"ServiceOptions.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.ServiceOptions.uninterpreted_option\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"ServiceOptions\"], baseName' = FName \"uninterpreted_option\"}, fieldNumber = FieldId {getFieldId = 999}, wireTag = WireTag {getWireTag = 7994}, wireTagLength = 2, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 18999}),(FieldId {getFieldId = 20000},FieldId {getFieldId = 536870911})], knownKeys = fromList [], storeUnknown = True}"
+ Text/DescriptorProtos/UninterpretedOption.hs view
@@ -0,0 +1,84 @@+module Text.DescriptorProtos.UninterpretedOption (UninterpretedOption(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.UninterpretedOption.NamePart as DescriptorProtos.UninterpretedOption (NamePart)+ +data UninterpretedOption = UninterpretedOption{name :: P'.Seq DescriptorProtos.UninterpretedOption.NamePart,+ identifier_value :: P'.Maybe P'.Utf8, positive_int_value :: P'.Maybe P'.Word64,+ negative_int_value :: P'.Maybe P'.Int64, double_value :: P'.Maybe P'.Double,+ string_value :: P'.Maybe P'.ByteString, unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage UninterpretedOption where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +instance P'.Mergeable UninterpretedOption where+ mergeEmpty = UninterpretedOption P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (UninterpretedOption x'1 x'2 x'3 x'4 x'5 x'6 x'7) (UninterpretedOption y'1 y'2 y'3 y'4 y'5 y'6 y'7)+ = UninterpretedOption (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)+ (P'.mergeAppend x'5 y'5)+ (P'.mergeAppend x'6 y'6)+ (P'.mergeAppend x'7 y'7)+ +instance P'.Default UninterpretedOption where+ defaultValue+ = UninterpretedOption P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue+ P'.defaultValue+ +instance P'.Wire UninterpretedOption where+ wireSize ft' self'@(UninterpretedOption x'1 x'2 x'3 x'4 x'5 x'6 x'7)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self'+ where+ calc'Size+ = (P'.wireSizeRep 1 11 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 4 x'3 + P'.wireSizeOpt 1 3 x'4 ++ P'.wireSizeOpt 1 1 x'5+ + P'.wireSizeOpt 1 12 x'6+ + P'.wireSizeUnknownField x'7)+ wirePut ft' self'@(UninterpretedOption x'1 x'2 x'3 x'4 x'5 x'6 x'7)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self'+ where+ put'Fields+ = do+ P'.wirePutRep 18 11 x'1+ P'.wirePutOpt 26 9 x'2+ P'.wirePutOpt 32 4 x'3+ P'.wirePutOpt 40 3 x'4+ P'.wirePutOpt 49 1 x'5+ P'.wirePutOpt 58 12 x'6+ P'.wirePutUnknownField x'7+ wireGet ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft'+ where+ update'Self field'Number old'Self+ = case field'Number of+ 2 -> P'.fmap (\ new'Field -> old'Self{name = P'.append (name old'Self) new'Field}) (P'.wireGet 11)+ 3 -> P'.fmap (\ new'Field -> old'Self{identifier_value = P'.Just new'Field}) (P'.wireGet 9)+ 4 -> P'.fmap (\ new'Field -> old'Self{positive_int_value = P'.Just new'Field}) (P'.wireGet 4)+ 5 -> P'.fmap (\ new'Field -> old'Self{negative_int_value = P'.Just new'Field}) (P'.wireGet 3)+ 6 -> P'.fmap (\ new'Field -> old'Self{double_value = P'.Just new'Field}) (P'.wireGet 1)+ 7 -> P'.fmap (\ new'Field -> old'Self{string_value = P'.Just new'Field}) (P'.wireGet 12)+ _ -> P'.unknownField field'Number+ +instance P'.MessageAPI msg' (msg' -> UninterpretedOption) UninterpretedOption where+ getVal m' f' = f' m'+ +instance P'.GPB UninterpretedOption+ +instance P'.ReflectDescriptor UninterpretedOption where+ reflectDescriptorInfo _+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"UninterpretedOption\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"UninterpretedOption.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"name\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, wireTagLength = 1, isRequired = False, canRepeat = True, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption.NamePart\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName = MName \"NamePart\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.identifier_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"identifier_value\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.positive_int_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"positive_int_value\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.negative_int_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"negative_int_value\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 3}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.double_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"double_value\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 49}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 1}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.string_value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName' = FName \"string_value\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, wireTagLength = 1, isRequired = False, canRepeat = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
+ Text/DescriptorProtos/UninterpretedOption/NamePart.hs view
@@ -0,0 +1,63 @@+module Text.DescriptorProtos.UninterpretedOption.NamePart (NamePart(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data NamePart = NamePart{name_part :: P'.Utf8, is_extension :: P'.Bool, unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage NamePart where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +instance P'.Mergeable NamePart where+ mergeEmpty = NamePart P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty+ mergeAppend (NamePart x'1 x'2 x'3) (NamePart y'1 y'2 y'3)+ = NamePart (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)+ +instance P'.Default NamePart where+ defaultValue = NamePart P'.defaultValue P'.defaultValue P'.defaultValue+ +instance P'.Wire NamePart where+ wireSize ft' self'@(NamePart x'1 x'2 x'3)+ = case ft' of+ 10 -> calc'Size+ 11 -> P'.prependMessageSize calc'Size+ _ -> P'.wireSizeErr ft' self'+ where+ calc'Size = (P'.wireSizeReq 1 9 x'1 + P'.wireSizeReq 1 8 x'2 + P'.wireSizeUnknownField x'3)+ wirePut ft' self'@(NamePart x'1 x'2 x'3)+ = case ft' of+ 10 -> put'Fields+ 11+ -> do+ P'.putSize (P'.wireSize 10 self')+ put'Fields+ _ -> P'.wirePutErr ft' self'+ where+ put'Fields+ = do+ P'.wirePutReq 10 9 x'1+ P'.wirePutReq 16 8 x'2+ P'.wirePutUnknownField x'3+ wireGet ft'+ = case ft' of+ 10 -> P'.getBareMessageWith P'.loadUnknown update'Self+ 11 -> P'.getMessageWith P'.loadUnknown update'Self+ _ -> P'.wireGetErr ft'+ where+ update'Self field'Number old'Self+ = case field'Number of+ 1 -> P'.fmap (\ new'Field -> old'Self{name_part = new'Field}) (P'.wireGet 9)+ 2 -> P'.fmap (\ new'Field -> old'Self{is_extension = new'Field}) (P'.wireGet 8)+ _ -> P'.unknownField field'Number+ +instance P'.MessageAPI msg' (msg' -> NamePart) NamePart where+ getVal m' f' = f' m'+ +instance P'.GPB NamePart+ +instance P'.ReflectDescriptor NamePart where+ reflectDescriptorInfo _+ = P'.read+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.UninterpretedOption.NamePart\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\",MName \"UninterpretedOption\"], baseName = MName \"NamePart\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"UninterpretedOption\",\"NamePart.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.NamePart.name_part\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\",MName \"NamePart\"], baseName' = FName \"name_part\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, wireTagLength = 1, isRequired = True, canRepeat = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.UninterpretedOption.NamePart.is_extension\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"UninterpretedOption\",MName \"NamePart\"], baseName' = FName \"is_extension\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, wireTagLength = 1, isRequired = True, canRepeat = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True}"
descriptor.proto view
@@ -1,18 +1,32 @@ // Protocol Buffers - Google's data interchange format-// Copyright 2008 Google Inc.+// Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ //-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at+// Redistribution and use in source and binary forms, with or without+// modification, are permitted provided that the following conditions are+// met: //-// http://www.apache.org/licenses/LICENSE-2.0+// * Redistributions of source code must retain the above copyright+// notice, this list of conditions and the following disclaimer.+// * Redistributions in binary form must reproduce the above+// copyright notice, this list of conditions and the following disclaimer+// in the documentation and/or other materials provided with the+// distribution.+// * Neither the name of Google Inc. nor the names of its+// contributors may be used to endorse or promote products derived from+// this software without specific prior written permission. //-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License.+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by@@ -32,6 +46,12 @@ // algorithms don't work during bootstrapping. option optimize_for = SPEED; +// The protocol compiler can output a FileDescriptorSet containing the .proto+// files it parses.+message FileDescriptorSet {+ repeated FileDescriptorProto file = 1;+}+ // Describes a complete .proto file. message FileDescriptorProto { optional string name = 1; // file name, relative to root of source tree@@ -179,8 +199,27 @@ // Each of the definitions above may have "options" attached. These are // just annotations which may cause code to be generated slightly differently // or may contain hints for code that manipulates protocol messages.+//+// Clients may define custom options as extensions of the *Options messages.+// These extensions may not yet be known at parsing time, so the parser cannot+// store the values in them. Instead it stores them in a field in the *Options+// message called uninterpreted_option. This field must have the same name+// across all *Options messages. We then use this field to populate the+// extensions when we build a descriptor, at which point all protos have been+// parsed and so all extensions are known.+//+// Extension numbers for custom options may be chosen as follows:+// * For options which will only be used within a single application or+// organization, or for experimental options, use field numbers 50000+// through 99999. It is up to you to ensure that you do not use the+// same number for multiple options.+// * For options which will be published and used publicly by multiple+// independent entities, e-mail kenton@google.com to reserve extension+// numbers. Simply tell me how many you need and I'll send you back a+// set of numbers to use -- there's no need to explain how you intend to+// use them. If this turns out to be popular, a web service will be set up+// to automatically assign option numbers. -// TODO(kenton): Allow extensions to options. message FileOptions { @@ -212,6 +251,12 @@ CODE_SIZE = 2; // Use ReflectionOps to implement these methods. } optional OptimizeMode optimize_for = 9 [default=CODE_SIZE];++ // The parser stores options it doesn't recognize here. See above.+ repeated UninterpretedOption uninterpreted_option = 999;++ // Clients can define custom options in extensions of this message. See above.+ extensions 1000 to max; } message MessageOptions {@@ -234,6 +279,12 @@ // Because this is an option, the above two restrictions are not enforced by // the protocol compiler. optional bool message_set_wire_format = 1 [default=false];++ // The parser stores options it doesn't recognize here. See above.+ repeated UninterpretedOption uninterpreted_option = 999;++ // Clients can define custom options in extensions of this message. See above.+ extensions 1000 to max; } message FieldOptions {@@ -261,12 +312,28 @@ // In this situation, the map key for Item will be set to "name". // TODO: Fully-implement this, then remove the "experimental_" prefix. optional string experimental_map_key = 9;++ // The parser stores options it doesn't recognize here. See above.+ repeated UninterpretedOption uninterpreted_option = 999;++ // Clients can define custom options in extensions of this message. See above.+ extensions 1000 to max; } message EnumOptions {+ // The parser stores options it doesn't recognize here. See above.+ repeated UninterpretedOption uninterpreted_option = 999;++ // Clients can define custom options in extensions of this message. See above.+ extensions 1000 to max; } message EnumValueOptions {+ // The parser stores options it doesn't recognize here. See above.+ repeated UninterpretedOption uninterpreted_option = 999;++ // Clients can define custom options in extensions of this message. See above.+ extensions 1000 to max; } message ServiceOptions {@@ -275,6 +342,12 @@ // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol // Buffers.++ // The parser stores options it doesn't recognize here. See above.+ repeated UninterpretedOption uninterpreted_option = 999;++ // Clients can define custom options in extensions of this message. See above.+ extensions 1000 to max; } message MethodOptions {@@ -283,4 +356,37 @@ // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol // Buffers.++ // The parser stores options it doesn't recognize here. See above.+ repeated UninterpretedOption uninterpreted_option = 999;++ // Clients can define custom options in extensions of this message. See above.+ extensions 1000 to max;+}++// A message representing a option the parser does not recognize. This only+// appears in options protos created by the compiler::Parser class.+// DescriptorPool resolves these when building Descriptor objects. Therefore,+// options protos in descriptor objects (e.g. returned by Descriptor::options(),+// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions+// in them.+message UninterpretedOption {+ // The name of the uninterpreted option. Each string represents a segment in+ // a dot-separated name. is_extension is true iff a segment represents an+ // extension (denoted with parentheses in options specs in .proto files).+ // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents+ // "foo.(bar.baz).qux".+ message NamePart {+ required string name_part = 1;+ required bool is_extension = 2;+ }+ repeated NamePart name = 2;++ // The value of the uninterpreted option, in whatever type the tokenizer+ // identified it as during parsing. Exactly one of these should be set.+ optional string identifier_value = 3;+ optional uint64 positive_int_value = 4;+ optional int64 negative_int_value = 5;+ optional double double_value = 6;+ optional bytes string_value = 7; }
protocol-buffers-descriptor.cabal view
@@ -1,5 +1,5 @@ name: protocol-buffers-descriptor-version: 0.3.1+version: 1.0.0 cabal-version: >= 1.2 build-type: Simple license: BSD3@@ -10,7 +10,7 @@ stability: Experimental homepage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/protocol-buffers package-url: http://darcs.haskell.org/packages/protocol-buffers2/-synopsis: Self-description of Google Protocol Buffer specifications+synopsis: Text.DescriptorProto.Options and Google Protocol Buffer specifications description: Uses protocol-buffers package category: Text Tested-With: GHC ==6.8.3@@ -23,7 +23,8 @@ Library ghc-options: -O2- exposed-modules: Text.DescriptorProtos+ exposed-modules: Text.DescriptorProtos.Options+ Text.DescriptorProtos Text.DescriptorProtos.DescriptorProto Text.DescriptorProtos.DescriptorProto.ExtensionRange Text.DescriptorProtos.EnumDescriptorProto@@ -36,6 +37,7 @@ Text.DescriptorProtos.FieldOptions Text.DescriptorProtos.FieldOptions.CType Text.DescriptorProtos.FileDescriptorProto+ Text.DescriptorProtos.FileDescriptorSet Text.DescriptorProtos.FileOptions Text.DescriptorProtos.FileOptions.OptimizeMode Text.DescriptorProtos.MessageOptions@@ -43,29 +45,22 @@ Text.DescriptorProtos.MethodOptions Text.DescriptorProtos.ServiceDescriptorProto Text.DescriptorProtos.ServiceOptions+ Text.DescriptorProtos.UninterpretedOption+ Text.DescriptorProtos.UninterpretedOption.NamePart + if flag(small_base) build-depends: base >= 3, containers,- bytestring,- array,- filepath,- directory,- mtl,- QuickCheck+ bytestring else build-depends: base < 3 - build-depends: protocol-buffers == 0.3.1+ build-depends: protocol-buffers == 1.0.0 extensions: DeriveDataTypeable, EmptyDataDecls, FlexibleInstances,- GADTs,- GeneralizedNewtypeDeriving,- MagicHash,- PatternGuards,- RankNTypes,- ScopedTypeVariables,- TypeSynonymInstances, MultiParamTypeClasses,- FunctionalDependencies+ FunctionalDependencies,+ FlexibleContexts+