protocol-buffers-descriptor (empty) → 0.3.1
raw patch · 24 files changed
+1940/−0 lines, 24 filesdep +QuickCheckdep +arraydep +basesetup-changed
Dependencies added: QuickCheck, array, base, bytestring, containers, directory, filepath, mtl, protocol-buffers
Files
- LICENSE +214/−0
- Setup.hs +2/−0
- Text/DescriptorProtos.hs +18/−0
- Text/DescriptorProtos/DescriptorProto.hs +98/−0
- Text/DescriptorProtos/DescriptorProto/ExtensionRange.hs +63/−0
- Text/DescriptorProtos/EnumDescriptorProto.hs +69/−0
- Text/DescriptorProtos/EnumOptions.hs +58/−0
- Text/DescriptorProtos/EnumValueDescriptorProto.hs +69/−0
- Text/DescriptorProtos/EnumValueOptions.hs +58/−0
- Text/DescriptorProtos/FieldDescriptorProto.hs +103/−0
- Text/DescriptorProtos/FieldDescriptorProto/Label.hs +49/−0
- Text/DescriptorProtos/FieldDescriptorProto/Type.hs +132/−0
- Text/DescriptorProtos/FieldOptions.hs +65/−0
- Text/DescriptorProtos/FieldOptions/CType.hs +43/−0
- Text/DescriptorProtos/FileDescriptorProto.hs +104/−0
- Text/DescriptorProtos/FileOptions.hs +73/−0
- Text/DescriptorProtos/FileOptions/OptimizeMode.hs +43/−0
- Text/DescriptorProtos/MessageOptions.hs +60/−0
- Text/DescriptorProtos/MethodDescriptorProto.hs +75/−0
- Text/DescriptorProtos/MethodOptions.hs +58/−0
- Text/DescriptorProtos/ServiceDescriptorProto.hs +71/−0
- Text/DescriptorProtos/ServiceOptions.hs +58/−0
- descriptor.proto +286/−0
- protocol-buffers-descriptor.cabal +71/−0
+ LICENSE view
@@ -0,0 +1,214 @@+Copyright (c) 2008, Christopher Edward Kuklewicz+All rights reserved.++Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:++ * 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 the copyright holder nor the names of the contributors may be used to endorse or promote products derived from this software without specific prior written permission.++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.++The descriptor.proto and unittest.proto files from google's code are under the Apache license (2.0):++ Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/++ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++ 1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship, whether in Source or+ Object form, made available under the License, as indicated by a+ copyright notice that is included in or attached to the work+ (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other modifications+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean any work of authorship, including+ the original version of the Work and any modifications or additions+ to that Work or Derivative Works thereof, that is intentionally+ submitted to Licensor for inclusion in the Work by the copyright owner+ or by an individual or Legal Entity authorized to submit on behalf of+ the copyright owner. For the purposes of this definition, "submitted"+ means any form of electronic, verbal, or written communication sent+ to the Licensor or its representatives, including but not limited to+ communication on electronic mailing lists, source code control systems,+ and issue tracking systems that are managed by, or on behalf of, the+ Licensor for the purpose of discussing and improving the Work, but+ excluding communication that is conspicuously marked or otherwise+ designated in writing by the copyright owner as "Not a Contribution."++ "Contributor" shall mean Licensor and any individual or Legal Entity+ on behalf of whom a Contribution has been received by Licensor and+ subsequently incorporated within the Work.++ 2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++ 3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a+ cross-claim or counterclaim in a lawsuit) alleging that the Work+ or a Contribution incorporated within the Work constitutes direct+ or contributory patent infringement, then any patent licenses+ granted to You under this License for that Work shall terminate+ as of the date such litigation is filed.++ 4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or+ Derivative Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, then any Derivative Works that You distribute must+ include a readable copy of the attribution notices contained+ within such NOTICE file, excluding those notices that do not+ pertain to any part of the Derivative Works, in at least one+ of the following places: within a NOTICE text file distributed+ as part of the Derivative Works; within the Source form or+ documentation, if provided along with the Derivative Works; or,+ within a display generated by the Derivative Works, if and+ wherever such third-party notices normally appear. The contents+ of the NOTICE file are for informational purposes only and+ do not modify the License. You may add Your own attribution+ notices within Derivative Works that You distribute, alongside+ or as an addendum to the NOTICE text from the Work, provided+ that such additional attribution notices cannot be construed+ as modifying the License.++ You may add Your own copyright statement to Your modifications and+ may provide additional or different license terms and conditions+ for use, reproduction, or distribution of Your modifications, or+ for any such Derivative Works as a whole, provided Your use,+ reproduction, and distribution of the Work otherwise complies with+ the conditions stated in this License.++ 5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++ 6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++ 7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or redistributing the Work and assume any+ risks associated with Your exercise of permissions under this License.++ 8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or consequential damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or any and all+ other commercial damages or losses), even if such Contributor+ has been advised of the possibility of such damages.++ 9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may act only+ on Your own behalf and on Your sole responsibility, not on behalf+ of any other Contributor, and only if You agree to indemnify,+ defend, and hold each Contributor harmless for any liability+ incurred by, or claims asserted against, such Contributor by reason+ of your accepting any such warranty or additional liability.++ END OF TERMS AND CONDITIONS++ APPENDIX: How to apply the Apache License to your work.++ To apply the Apache License to your work, attach the following+ boilerplate notice, with the fields enclosed by brackets "[]"+ replaced with your own identifying information. (Don't include+ the brackets!) The text should be enclosed in the appropriate+ comment syntax for the file format. We also recommend that a+ file or class name and description of purpose be included on the+ same "printed page" as the copyright notice for easier+ identification within third-party archives.++ Copyright [yyyy] [name of copyright owner]++ 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++ http://www.apache.org/licenses/LICENSE-2.0++ 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.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMainWithHooks defaultUserHooks
+ Text/DescriptorProtos.hs view
@@ -0,0 +1,18 @@+module Text.DescriptorProtos (protoInfo, fileDescriptorProto) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import Text.DescriptorProtos.FileDescriptorProto (FileDescriptorProto)+import Text.ProtocolBuffers.Reflections (ProtoInfo)+import qualified Text.ProtocolBuffers.WireMessage as P' (wireGet,getFromBS)+ +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 []}"+ +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")
+ Text/DescriptorProtos/DescriptorProto.hs view
@@ -0,0 +1,98 @@+module Text.DescriptorProtos.DescriptorProto (DescriptorProto(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.DescriptorProto.ExtensionRange as DescriptorProtos.DescriptorProto (ExtensionRange)+import qualified Text.DescriptorProtos.EnumDescriptorProto as DescriptorProtos (EnumDescriptorProto)+import qualified Text.DescriptorProtos.FieldDescriptorProto as DescriptorProtos (FieldDescriptorProto)+import qualified Text.DescriptorProtos.MessageOptions as DescriptorProtos (MessageOptions)+ +data DescriptorProto = DescriptorProto{name :: P'.Maybe P'.Utf8, field :: P'.Seq DescriptorProtos.FieldDescriptorProto,+ extension :: P'.Seq DescriptorProtos.FieldDescriptorProto,+ nested_type :: P'.Seq DescriptorProto,+ enum_type :: P'.Seq DescriptorProtos.EnumDescriptorProto,+ extension_range :: P'.Seq DescriptorProtos.DescriptorProto.ExtensionRange,+ options :: P'.Maybe DescriptorProtos.MessageOptions, unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage DescriptorProto where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +instance P'.Mergeable DescriptorProto where+ 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)+ +instance P'.Default DescriptorProto where+ 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'+ 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)+ 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'+ 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+ 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 = 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'+ +instance P'.GPB DescriptorProto+ +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}"
+ Text/DescriptorProtos/DescriptorProto/ExtensionRange.hs view
@@ -0,0 +1,63 @@+module Text.DescriptorProtos.DescriptorProto.ExtensionRange (ExtensionRange(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data ExtensionRange = ExtensionRange{start :: P'.Maybe P'.Int32, end :: P'.Maybe P'.Int32, unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage ExtensionRange where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +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)+ +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'+ 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'+ where+ put'Fields+ = 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'+ 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+ +instance P'.MessageAPI msg' (msg' -> ExtensionRange) ExtensionRange where+ getVal m' f' = f' m'+ +instance P'.GPB ExtensionRange+ +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}"
+ Text/DescriptorProtos/EnumDescriptorProto.hs view
@@ -0,0 +1,69 @@+module Text.DescriptorProtos.EnumDescriptorProto (EnumDescriptorProto(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.EnumOptions as DescriptorProtos (EnumOptions)+import qualified Text.DescriptorProtos.EnumValueDescriptorProto as DescriptorProtos (EnumValueDescriptorProto)+ +data EnumDescriptorProto = EnumDescriptorProto{name :: P'.Maybe P'.Utf8, value :: P'.Seq DescriptorProtos.EnumValueDescriptorProto,+ options :: P'.Maybe DescriptorProtos.EnumOptions, unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage EnumDescriptorProto where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +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)+ +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'+ 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'+ 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+ 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 = 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'+ +instance P'.GPB EnumDescriptorProto+ +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}"
+ Text/DescriptorProtos/EnumOptions.hs view
@@ -0,0 +1,58 @@+module Text.DescriptorProtos.EnumOptions (EnumOptions(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data EnumOptions = EnumOptions{unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +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)+ +instance P'.Default EnumOptions where+ defaultValue = EnumOptions 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'+ 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'+ where+ put'Fields+ = do+ P'.return ()+ 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+ _ -> P'.unknownField field'Number+ +instance P'.MessageAPI msg' (msg' -> EnumOptions) EnumOptions where+ getVal m' f' = f' m'+ +instance P'.GPB EnumOptions+ +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}"
+ Text/DescriptorProtos/EnumValueDescriptorProto.hs view
@@ -0,0 +1,69 @@+module Text.DescriptorProtos.EnumValueDescriptorProto (EnumValueDescriptorProto(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.EnumValueOptions as DescriptorProtos (EnumValueOptions)+ +data EnumValueDescriptorProto = EnumValueDescriptorProto{name :: P'.Maybe P'.Utf8, number :: P'.Maybe P'.Int32,+ options :: P'.Maybe DescriptorProtos.EnumValueOptions,+ unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage EnumValueDescriptorProto where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +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)+ +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'+ 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'+ 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+ 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 = 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'+ +instance P'.GPB EnumValueDescriptorProto+ +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}"
+ Text/DescriptorProtos/EnumValueOptions.hs view
@@ -0,0 +1,58 @@+module Text.DescriptorProtos.EnumValueOptions (EnumValueOptions(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data EnumValueOptions = EnumValueOptions{unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +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)+ +instance P'.Default EnumValueOptions where+ defaultValue = EnumValueOptions 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'+ 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'+ where+ put'Fields+ = do+ P'.return ()+ 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+ _ -> P'.unknownField field'Number+ +instance P'.MessageAPI msg' (msg' -> EnumValueOptions) EnumValueOptions where+ getVal m' f' = f' m'+ +instance P'.GPB EnumValueOptions+ +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}"
+ Text/DescriptorProtos/FieldDescriptorProto.hs view
@@ -0,0 +1,103 @@+module Text.DescriptorProtos.FieldDescriptorProto (FieldDescriptorProto(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.FieldDescriptorProto.Label as DescriptorProtos.FieldDescriptorProto (Label)+import qualified Text.DescriptorProtos.FieldDescriptorProto.Type as DescriptorProtos.FieldDescriptorProto (Type)+import qualified Text.DescriptorProtos.FieldOptions as DescriptorProtos (FieldOptions)+ +data FieldDescriptorProto = FieldDescriptorProto{name :: P'.Maybe P'.Utf8, number :: P'.Maybe P'.Int32,+ label :: P'.Maybe DescriptorProtos.FieldDescriptorProto.Label,+ type' :: P'.Maybe DescriptorProtos.FieldDescriptorProto.Type,+ type_name :: P'.Maybe P'.Utf8, extendee :: P'.Maybe P'.Utf8,+ default_value :: P'.Maybe P'.Utf8,+ options :: P'.Maybe DescriptorProtos.FieldOptions,+ unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage FieldDescriptorProto where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +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+ 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)+ +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+ +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'+ 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)+ 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'+ 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+ 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 = 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'+ +instance P'.GPB FieldDescriptorProto+ +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}"
+ Text/DescriptorProtos/FieldDescriptorProto/Label.hs view
@@ -0,0 +1,49 @@+module Text.DescriptorProtos.FieldDescriptorProto.Label (Label(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data Label = LABEL_OPTIONAL+ | LABEL_REQUIRED+ | LABEL_REPEATED+ deriving (P'.Read, P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.Mergeable Label+ +instance P'.Bounded Label where+ minBound = LABEL_OPTIONAL+ maxBound = LABEL_REPEATED+ +instance P'.Default Label where+ defaultValue = LABEL_OPTIONAL+ +instance P'.Enum Label where+ fromEnum (LABEL_OPTIONAL) = 1+ fromEnum (LABEL_REQUIRED) = 2+ fromEnum (LABEL_REPEATED) = 3+ toEnum 1 = LABEL_OPTIONAL+ toEnum 2 = LABEL_REQUIRED+ toEnum 3 = LABEL_REPEATED+ succ (LABEL_OPTIONAL) = LABEL_REQUIRED+ succ (LABEL_REQUIRED) = LABEL_REPEATED+ pred (LABEL_REQUIRED) = LABEL_OPTIONAL+ pred (LABEL_REPEATED) = LABEL_REQUIRED+ +instance P'.Wire Label where+ wireSize ft' enum = P'.wireSize ft' (P'.fromEnum enum)+ wirePut ft' enum = P'.wirePut ft' (P'.fromEnum enum)+ wireGet 14 = P'.fmap P'.toEnum (P'.wireGet 14)+ wireGet ft' = P'.wireGetErr ft'+ +instance P'.GPB Label+ +instance P'.MessageAPI msg' (msg' -> Label) Label where+ getVal m' f' = f' m'+ +instance P'.ReflectEnum Label where+ reflectEnum+ = [(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")]
+ Text/DescriptorProtos/FieldDescriptorProto/Type.hs view
@@ -0,0 +1,132 @@+module Text.DescriptorProtos.FieldDescriptorProto.Type (Type(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data Type = TYPE_DOUBLE+ | TYPE_FLOAT+ | TYPE_INT64+ | TYPE_UINT64+ | TYPE_INT32+ | TYPE_FIXED64+ | TYPE_FIXED32+ | TYPE_BOOL+ | TYPE_STRING+ | TYPE_GROUP+ | TYPE_MESSAGE+ | TYPE_BYTES+ | TYPE_UINT32+ | TYPE_ENUM+ | TYPE_SFIXED32+ | TYPE_SFIXED64+ | TYPE_SINT32+ | TYPE_SINT64+ deriving (P'.Read, P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.Mergeable Type+ +instance P'.Bounded Type where+ minBound = TYPE_DOUBLE+ maxBound = TYPE_SINT64+ +instance P'.Default Type where+ defaultValue = TYPE_DOUBLE+ +instance P'.Enum Type where+ fromEnum (TYPE_DOUBLE) = 1+ fromEnum (TYPE_FLOAT) = 2+ fromEnum (TYPE_INT64) = 3+ fromEnum (TYPE_UINT64) = 4+ fromEnum (TYPE_INT32) = 5+ fromEnum (TYPE_FIXED64) = 6+ fromEnum (TYPE_FIXED32) = 7+ fromEnum (TYPE_BOOL) = 8+ fromEnum (TYPE_STRING) = 9+ fromEnum (TYPE_GROUP) = 10+ fromEnum (TYPE_MESSAGE) = 11+ fromEnum (TYPE_BYTES) = 12+ fromEnum (TYPE_UINT32) = 13+ fromEnum (TYPE_ENUM) = 14+ fromEnum (TYPE_SFIXED32) = 15+ fromEnum (TYPE_SFIXED64) = 16+ fromEnum (TYPE_SINT32) = 17+ fromEnum (TYPE_SINT64) = 18+ toEnum 1 = TYPE_DOUBLE+ toEnum 2 = TYPE_FLOAT+ toEnum 3 = TYPE_INT64+ toEnum 4 = TYPE_UINT64+ toEnum 5 = TYPE_INT32+ toEnum 6 = TYPE_FIXED64+ toEnum 7 = TYPE_FIXED32+ toEnum 8 = TYPE_BOOL+ toEnum 9 = TYPE_STRING+ toEnum 10 = TYPE_GROUP+ toEnum 11 = TYPE_MESSAGE+ toEnum 12 = TYPE_BYTES+ toEnum 13 = TYPE_UINT32+ toEnum 14 = TYPE_ENUM+ toEnum 15 = TYPE_SFIXED32+ toEnum 16 = TYPE_SFIXED64+ toEnum 17 = TYPE_SINT32+ toEnum 18 = TYPE_SINT64+ succ (TYPE_DOUBLE) = TYPE_FLOAT+ succ (TYPE_FLOAT) = TYPE_INT64+ succ (TYPE_INT64) = TYPE_UINT64+ succ (TYPE_UINT64) = TYPE_INT32+ succ (TYPE_INT32) = TYPE_FIXED64+ succ (TYPE_FIXED64) = TYPE_FIXED32+ succ (TYPE_FIXED32) = TYPE_BOOL+ succ (TYPE_BOOL) = TYPE_STRING+ succ (TYPE_STRING) = TYPE_GROUP+ succ (TYPE_GROUP) = TYPE_MESSAGE+ succ (TYPE_MESSAGE) = TYPE_BYTES+ succ (TYPE_BYTES) = TYPE_UINT32+ succ (TYPE_UINT32) = TYPE_ENUM+ succ (TYPE_ENUM) = TYPE_SFIXED32+ succ (TYPE_SFIXED32) = TYPE_SFIXED64+ succ (TYPE_SFIXED64) = TYPE_SINT32+ succ (TYPE_SINT32) = TYPE_SINT64+ pred (TYPE_FLOAT) = TYPE_DOUBLE+ pred (TYPE_INT64) = TYPE_FLOAT+ pred (TYPE_UINT64) = TYPE_INT64+ pred (TYPE_INT32) = TYPE_UINT64+ pred (TYPE_FIXED64) = TYPE_INT32+ pred (TYPE_FIXED32) = TYPE_FIXED64+ pred (TYPE_BOOL) = TYPE_FIXED32+ pred (TYPE_STRING) = TYPE_BOOL+ pred (TYPE_GROUP) = TYPE_STRING+ pred (TYPE_MESSAGE) = TYPE_GROUP+ pred (TYPE_BYTES) = TYPE_MESSAGE+ pred (TYPE_UINT32) = TYPE_BYTES+ pred (TYPE_ENUM) = TYPE_UINT32+ pred (TYPE_SFIXED32) = TYPE_ENUM+ pred (TYPE_SFIXED64) = TYPE_SFIXED32+ pred (TYPE_SINT32) = TYPE_SFIXED64+ pred (TYPE_SINT64) = TYPE_SINT32+ +instance P'.Wire Type where+ wireSize ft' enum = P'.wireSize ft' (P'.fromEnum enum)+ wirePut ft' enum = P'.wirePut ft' (P'.fromEnum enum)+ wireGet 14 = P'.fmap P'.toEnum (P'.wireGet 14)+ wireGet ft' = P'.wireGetErr ft'+ +instance P'.GPB Type+ +instance P'.MessageAPI msg' (msg' -> Type) Type where+ getVal m' f' = f' m'+ +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)]+ 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")]
+ Text/DescriptorProtos/FieldOptions.hs view
@@ -0,0 +1,65 @@+module Text.DescriptorProtos.FieldOptions (FieldOptions(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.FieldOptions.CType as DescriptorProtos.FieldOptions (CType)+ +data FieldOptions = FieldOptions{ctype :: P'.Maybe DescriptorProtos.FieldOptions.CType, experimental_map_key :: P'.Maybe P'.Utf8,+ unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +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)+ +instance P'.Default FieldOptions where+ defaultValue = FieldOptions 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'+ 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'+ where+ put'Fields+ = do+ P'.wirePutOpt 8 14 x'1+ P'.wirePutOpt 74 9 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{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+ +instance P'.MessageAPI msg' (msg' -> FieldOptions) FieldOptions where+ getVal m' f' = f' m'+ +instance P'.GPB FieldOptions+ +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}"
+ Text/DescriptorProtos/FieldOptions/CType.hs view
@@ -0,0 +1,43 @@+module Text.DescriptorProtos.FieldOptions.CType (CType(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data CType = CORD+ | STRING_PIECE+ deriving (P'.Read, P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.Mergeable CType+ +instance P'.Bounded CType where+ minBound = CORD+ maxBound = STRING_PIECE+ +instance P'.Default CType where+ defaultValue = CORD+ +instance P'.Enum CType where+ fromEnum (CORD) = 1+ fromEnum (STRING_PIECE) = 2+ toEnum 1 = CORD+ toEnum 2 = STRING_PIECE+ succ (CORD) = STRING_PIECE+ pred (STRING_PIECE) = CORD+ +instance P'.Wire CType where+ wireSize ft' enum = P'.wireSize ft' (P'.fromEnum enum)+ wirePut ft' enum = P'.wirePut ft' (P'.fromEnum enum)+ wireGet 14 = P'.fmap P'.toEnum (P'.wireGet 14)+ wireGet ft' = P'.wireGetErr ft'+ +instance P'.GPB CType+ +instance P'.MessageAPI msg' (msg' -> CType) CType where+ getVal m' f' = f' m'+ +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")]
+ Text/DescriptorProtos/FileDescriptorProto.hs view
@@ -0,0 +1,104 @@+module Text.DescriptorProtos.FileDescriptorProto (FileDescriptorProto(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.DescriptorProto as DescriptorProtos (DescriptorProto)+import qualified Text.DescriptorProtos.EnumDescriptorProto as DescriptorProtos (EnumDescriptorProto)+import qualified Text.DescriptorProtos.FieldDescriptorProto as DescriptorProtos (FieldDescriptorProto)+import qualified Text.DescriptorProtos.FileOptions as DescriptorProtos (FileOptions)+import qualified Text.DescriptorProtos.ServiceDescriptorProto as DescriptorProtos (ServiceDescriptorProto)+ +data FileDescriptorProto = FileDescriptorProto{name :: P'.Maybe P'.Utf8, package :: P'.Maybe P'.Utf8, dependency :: P'.Seq P'.Utf8,+ message_type :: P'.Seq DescriptorProtos.DescriptorProto,+ enum_type :: P'.Seq DescriptorProtos.EnumDescriptorProto,+ service :: P'.Seq DescriptorProtos.ServiceDescriptorProto,+ extension :: P'.Seq DescriptorProtos.FieldDescriptorProto,+ options :: P'.Maybe DescriptorProtos.FileOptions, unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage FileDescriptorProto where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +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+ 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)+ +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+ +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'+ 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)+ 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'+ 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+ 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 = 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'+ +instance P'.GPB FileDescriptorProto+ +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}"
+ Text/DescriptorProtos/FileOptions.hs view
@@ -0,0 +1,73 @@+module Text.DescriptorProtos.FileOptions (FileOptions(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.FileOptions.OptimizeMode as DescriptorProtos.FileOptions (OptimizeMode)+ +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}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +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)+ +instance P'.Default FileOptions where+ defaultValue = FileOptions P'.defaultValue P'.defaultValue (P'.Just P'.False) (P'.Just (P'.read "CODE_SIZE")) 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'+ 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'+ 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+ 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{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+ +instance P'.MessageAPI msg' (msg' -> FileOptions) FileOptions where+ getVal m' f' = f' m'+ +instance P'.GPB FileOptions+ +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}"
+ Text/DescriptorProtos/FileOptions/OptimizeMode.hs view
@@ -0,0 +1,43 @@+module Text.DescriptorProtos.FileOptions.OptimizeMode (OptimizeMode(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data OptimizeMode = SPEED+ | CODE_SIZE+ deriving (P'.Read, P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.Mergeable OptimizeMode+ +instance P'.Bounded OptimizeMode where+ minBound = SPEED+ maxBound = CODE_SIZE+ +instance P'.Default OptimizeMode where+ defaultValue = SPEED+ +instance P'.Enum OptimizeMode where+ fromEnum (SPEED) = 1+ fromEnum (CODE_SIZE) = 2+ toEnum 1 = SPEED+ toEnum 2 = CODE_SIZE+ succ (SPEED) = CODE_SIZE+ pred (CODE_SIZE) = SPEED+ +instance P'.Wire OptimizeMode where+ wireSize ft' enum = P'.wireSize ft' (P'.fromEnum enum)+ wirePut ft' enum = P'.wirePut ft' (P'.fromEnum enum)+ wireGet 14 = P'.fmap P'.toEnum (P'.wireGet 14)+ wireGet ft' = P'.wireGetErr ft'+ +instance P'.GPB OptimizeMode+ +instance P'.MessageAPI msg' (msg' -> OptimizeMode) OptimizeMode where+ getVal m' f' = f' m'+ +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")]
+ Text/DescriptorProtos/MessageOptions.hs view
@@ -0,0 +1,60 @@+module Text.DescriptorProtos.MessageOptions (MessageOptions(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data MessageOptions = MessageOptions{message_set_wire_format :: P'.Maybe P'.Bool, unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +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)+ +instance P'.Default MessageOptions where+ defaultValue = MessageOptions (P'.Just P'.False) 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'+ 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'+ where+ put'Fields+ = do+ P'.wirePutOpt 8 8 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{message_set_wire_format = P'.Just new'Field}) (P'.wireGet 8)+ _ -> P'.unknownField field'Number+ +instance P'.MessageAPI msg' (msg' -> MessageOptions) MessageOptions where+ getVal m' f' = f' m'+ +instance P'.GPB MessageOptions+ +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}"
+ Text/DescriptorProtos/MethodDescriptorProto.hs view
@@ -0,0 +1,75 @@+module Text.DescriptorProtos.MethodDescriptorProto (MethodDescriptorProto(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.MethodOptions as DescriptorProtos (MethodOptions)+ +data MethodDescriptorProto = MethodDescriptorProto{name :: P'.Maybe P'.Utf8, input_type :: P'.Maybe P'.Utf8,+ output_type :: P'.Maybe P'.Utf8,+ options :: P'.Maybe DescriptorProtos.MethodOptions,+ unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage MethodDescriptorProto where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +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)+ +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'+ 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)+ 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'+ 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+ 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 = 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'+ +instance P'.GPB MethodDescriptorProto+ +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}"
+ Text/DescriptorProtos/MethodOptions.hs view
@@ -0,0 +1,58 @@+module Text.DescriptorProtos.MethodOptions (MethodOptions(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data MethodOptions = MethodOptions{unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +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)+ +instance P'.Default MethodOptions where+ defaultValue = MethodOptions 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'+ 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'+ where+ put'Fields+ = do+ P'.return ()+ 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+ _ -> P'.unknownField field'Number+ +instance P'.MessageAPI msg' (msg' -> MethodOptions) MethodOptions where+ getVal m' f' = f' m'+ +instance P'.GPB MethodOptions+ +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}"
+ Text/DescriptorProtos/ServiceDescriptorProto.hs view
@@ -0,0 +1,71 @@+module Text.DescriptorProtos.ServiceDescriptorProto (ServiceDescriptorProto(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+import qualified Text.DescriptorProtos.MethodDescriptorProto as DescriptorProtos (MethodDescriptorProto)+import qualified Text.DescriptorProtos.ServiceOptions as DescriptorProtos (ServiceOptions)+ +data ServiceDescriptorProto = ServiceDescriptorProto{name :: P'.Maybe P'.Utf8,+ method :: P'.Seq DescriptorProtos.MethodDescriptorProto,+ options :: P'.Maybe DescriptorProtos.ServiceOptions,+ unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +instance P'.UnknownMessage ServiceDescriptorProto where+ getUnknownField = unknown'field+ putUnknownField u'f msg = msg{unknown'field = u'f}+ +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)+ +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'+ 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'+ 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+ 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 = 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'+ +instance P'.GPB ServiceDescriptorProto+ +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}"
+ Text/DescriptorProtos/ServiceOptions.hs view
@@ -0,0 +1,58 @@+module Text.DescriptorProtos.ServiceOptions (ServiceOptions(..)) where+import Prelude ((+))+import qualified Prelude as P'+import qualified Text.ProtocolBuffers.Header as P'+ +data ServiceOptions = ServiceOptions{unknown'field :: P'.UnknownField}+ deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)+ +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)+ +instance P'.Default ServiceOptions where+ defaultValue = ServiceOptions 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'+ 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'+ where+ put'Fields+ = do+ P'.return ()+ 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+ _ -> P'.unknownField field'Number+ +instance P'.MessageAPI msg' (msg' -> ServiceOptions) ServiceOptions where+ getVal m' f' = f' m'+ +instance P'.GPB ServiceOptions+ +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}"
+ descriptor.proto view
@@ -0,0 +1,286 @@+// Protocol Buffers - Google's data interchange format+// Copyright 2008 Google Inc.+// 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+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// 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.++// Author: kenton@google.com (Kenton Varda)+// Based on original Protocol Buffers design by+// Sanjay Ghemawat, Jeff Dean, and others.+//+// The messages in this file describe the definitions found in .proto files.+// A valid .proto file can be translated directly to a FileDescriptorProto+// without any other information (e.g. without reading its imports).++++package google.protobuf;+option java_package = "com.google.protobuf";+option java_outer_classname = "DescriptorProtos";++// descriptor.proto must be optimized for speed because reflection-based+// algorithms don't work during bootstrapping.+option optimize_for = SPEED;++// Describes a complete .proto file.+message FileDescriptorProto {+ optional string name = 1; // file name, relative to root of source tree+ optional string package = 2; // e.g. "foo", "foo.bar", etc.++ // Names of files imported by this file.+ repeated string dependency = 3;++ // All top-level definitions in this file.+ repeated DescriptorProto message_type = 4;+ repeated EnumDescriptorProto enum_type = 5;+ repeated ServiceDescriptorProto service = 6;+ repeated FieldDescriptorProto extension = 7;++ optional FileOptions options = 8;+}++// Describes a message type.+message DescriptorProto {+ optional string name = 1;++ repeated FieldDescriptorProto field = 2;+ repeated FieldDescriptorProto extension = 6;++ repeated DescriptorProto nested_type = 3;+ repeated EnumDescriptorProto enum_type = 4;++ message ExtensionRange {+ optional int32 start = 1;+ optional int32 end = 2;+ }+ repeated ExtensionRange extension_range = 5;++ optional MessageOptions options = 7;+}++// Describes a field within a message.+message FieldDescriptorProto {+ enum Type {+ // 0 is reserved for errors.+ // Order is weird for historical reasons.+ TYPE_DOUBLE = 1;+ TYPE_FLOAT = 2;+ TYPE_INT64 = 3; // Not ZigZag encoded. Negative numbers+ // take 10 bytes. Use TYPE_SINT64 if negative+ // values are likely.+ TYPE_UINT64 = 4;+ TYPE_INT32 = 5; // Not ZigZag encoded. Negative numbers+ // take 10 bytes. Use TYPE_SINT32 if negative+ // values are likely.+ TYPE_FIXED64 = 6;+ TYPE_FIXED32 = 7;+ TYPE_BOOL = 8;+ TYPE_STRING = 9;+ TYPE_GROUP = 10; // Tag-delimited aggregate.+ TYPE_MESSAGE = 11; // Length-delimited aggregate.++ // New in version 2.+ TYPE_BYTES = 12;+ TYPE_UINT32 = 13;+ TYPE_ENUM = 14;+ TYPE_SFIXED32 = 15;+ TYPE_SFIXED64 = 16;+ TYPE_SINT32 = 17; // Uses ZigZag encoding.+ TYPE_SINT64 = 18; // Uses ZigZag encoding.+ };++ enum Label {+ // 0 is reserved for errors+ LABEL_OPTIONAL = 1;+ LABEL_REQUIRED = 2;+ LABEL_REPEATED = 3;+ // TODO(sanjay): Should we add LABEL_MAP?+ };++ optional string name = 1;+ optional int32 number = 3;+ optional Label label = 4;++ // If type_name is set, this need not be set. If both this and type_name+ // are set, this must be either TYPE_ENUM or TYPE_MESSAGE.+ optional Type type = 5;++ // For message and enum types, this is the name of the type. If the name+ // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping+ // rules are used to find the type (i.e. first the nested types within this+ // message are searched, then within the parent, on up to the root+ // namespace).+ optional string type_name = 6;++ // For extensions, this is the name of the type being extended. It is+ // resolved in the same manner as type_name.+ optional string extendee = 2;++ // For numeric types, contains the original text representation of the value.+ // For booleans, "true" or "false".+ // For strings, contains the default text contents (not escaped in any way).+ // For bytes, contains the C escaped value. All bytes >= 128 are escaped.+ // TODO(kenton): Base-64 encode?+ optional string default_value = 7;++ optional FieldOptions options = 8;+}++// Describes an enum type.+message EnumDescriptorProto {+ optional string name = 1;++ repeated EnumValueDescriptorProto value = 2;++ optional EnumOptions options = 3;+}++// Describes a value within an enum.+message EnumValueDescriptorProto {+ optional string name = 1;+ optional int32 number = 2;++ optional EnumValueOptions options = 3;+}++// Describes a service.+message ServiceDescriptorProto {+ optional string name = 1;+ repeated MethodDescriptorProto method = 2;++ optional ServiceOptions options = 3;+}++// Describes a method of a service.+message MethodDescriptorProto {+ optional string name = 1;++ // Input and output type names. These are resolved in the same way as+ // FieldDescriptorProto.type_name, but must refer to a message type.+ optional string input_type = 2;+ optional string output_type = 3;++ optional MethodOptions options = 4;+}++// ===================================================================+// Options++// 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.++// TODO(kenton): Allow extensions to options.++message FileOptions {++ // Sets the Java package where classes generated from this .proto will be+ // placed. By default, the proto package is used, but this is often+ // inappropriate because proto packages do not normally start with backwards+ // domain names.+ optional string java_package = 1;+++ // If set, all the classes from the .proto file are wrapped in a single+ // outer class with the given name. This applies to both Proto1+ // (equivalent to the old "--one_java_file" option) and Proto2 (where+ // a .proto always translates to a single class, but you may want to+ // explicitly choose the class name).+ optional string java_outer_classname = 8;++ // If set true, then the Java code generator will generate a separate .java+ // file for each top-level message, enum, and service defined in the .proto+ // file. Thus, these types will *not* be nested inside the outer class+ // named by java_outer_classname. However, the outer class will still be+ // generated to contain the file's getDescriptor() method as well as any+ // top-level extensions defined in the file.+ optional bool java_multiple_files = 10 [default=false];++ // Generated classes can be optimized for speed or code size.+ enum OptimizeMode {+ SPEED = 1; // Generate complete code for parsing, serialization, etc.+ CODE_SIZE = 2; // Use ReflectionOps to implement these methods.+ }+ optional OptimizeMode optimize_for = 9 [default=CODE_SIZE];+}++message MessageOptions {+ // Set true to use the old proto1 MessageSet wire format for extensions.+ // This is provided for backwards-compatibility with the MessageSet wire+ // format. You should not use this for any other reason: It's less+ // efficient, has fewer features, and is more complicated.+ //+ // The message must be defined exactly as follows:+ // message Foo {+ // option message_set_wire_format = true;+ // extensions 4 to max;+ // }+ // Note that the message cannot have any defined fields; MessageSets only+ // have extensions.+ //+ // All extensions of your type must be singular messages; e.g. they cannot+ // be int32s, enums, or repeated messages.+ //+ // 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];+}++message FieldOptions {+ // The ctype option instructs the C++ code generator to use a different+ // representation of the field than it normally would. See the specific+ // options below. This option is not yet implemented in the open source+ // release -- sorry, we'll try to include it in a future version!+ optional CType ctype = 1;+ enum CType {+ CORD = 1;++ STRING_PIECE = 2;+ }++ // EXPERIMENTAL. DO NOT USE.+ // For "map" fields, the name of the field in the enclosed type that+ // is the key for this map. For example, suppose we have:+ // message Item {+ // required string name = 1;+ // required string value = 2;+ // }+ // message Config {+ // repeated Item items = 1 [experimental_map_key="name"];+ // }+ // 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;+}++message EnumOptions {+}++message EnumValueOptions {+}++message ServiceOptions {++ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC+ // framework. We apologize for hoarding these numbers to ourselves, but+ // we were already using them long before we decided to release Protocol+ // Buffers.+}++message MethodOptions {++ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC+ // framework. We apologize for hoarding these numbers to ourselves, but+ // we were already using them long before we decided to release Protocol+ // Buffers.+}
+ protocol-buffers-descriptor.cabal view
@@ -0,0 +1,71 @@+name: protocol-buffers-descriptor+version: 0.3.1+cabal-version: >= 1.2+build-type: Simple+license: BSD3+license-file: LICENSE+copyright: (c) 2008 Christopher Edward Kuklewicz+author: Christopher Edward Kuklewicz+maintainer: Chris Kuklewicz <protobuf@personal.mightyreason.com>+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+description: Uses protocol-buffers package+category: Text+Tested-With: GHC ==6.8.3+data-files: descriptor.proto+extra-source-files: Setup.hs+-- extra-tmp-files:++flag small_base+ description: Choose the new smaller, split-up base package.++Library+ ghc-options: -O2+ exposed-modules: Text.DescriptorProtos+ Text.DescriptorProtos.DescriptorProto+ Text.DescriptorProtos.DescriptorProto.ExtensionRange+ Text.DescriptorProtos.EnumDescriptorProto+ Text.DescriptorProtos.EnumOptions+ Text.DescriptorProtos.EnumValueDescriptorProto+ Text.DescriptorProtos.EnumValueOptions+ Text.DescriptorProtos.FieldDescriptorProto+ Text.DescriptorProtos.FieldDescriptorProto.Label+ Text.DescriptorProtos.FieldDescriptorProto.Type+ Text.DescriptorProtos.FieldOptions+ Text.DescriptorProtos.FieldOptions.CType+ Text.DescriptorProtos.FileDescriptorProto+ Text.DescriptorProtos.FileOptions+ Text.DescriptorProtos.FileOptions.OptimizeMode+ Text.DescriptorProtos.MessageOptions+ Text.DescriptorProtos.MethodDescriptorProto+ Text.DescriptorProtos.MethodOptions+ Text.DescriptorProtos.ServiceDescriptorProto+ Text.DescriptorProtos.ServiceOptions++ if flag(small_base)+ build-depends: base >= 3,+ containers,+ bytestring,+ array,+ filepath,+ directory,+ mtl,+ QuickCheck+ else+ build-depends: base < 3++ build-depends: protocol-buffers == 0.3.1+ extensions: DeriveDataTypeable,+ EmptyDataDecls,+ FlexibleInstances,+ GADTs,+ GeneralizedNewtypeDeriving,+ MagicHash,+ PatternGuards,+ RankNTypes,+ ScopedTypeVariables,+ TypeSynonymInstances,+ MultiParamTypeClasses,+ FunctionalDependencies