packages feed

proto-lens-protoc 0.1.0.1 → 0.1.0.2

raw patch · 10 files changed

+1213/−1061 lines, 10 filesdep ~proto-lensnew-uploaderPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: proto-lens

API changes (from Hackage documentation)

+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: CodeGeneratorRequest :: [Text] -> Maybe Text -> [FileDescriptorProto] -> CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: CodeGeneratorResponse :: Maybe Text -> [CodeGeneratorResponse'File] -> CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: CodeGeneratorResponse'File :: Maybe Text -> Maybe Text -> Maybe Text -> CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: [_CodeGeneratorRequest'fileToGenerate] :: CodeGeneratorRequest -> [Text]
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: [_CodeGeneratorRequest'parameter] :: CodeGeneratorRequest -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: [_CodeGeneratorRequest'protoFile] :: CodeGeneratorRequest -> [FileDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: [_CodeGeneratorResponse'File'content] :: CodeGeneratorResponse'File -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: [_CodeGeneratorResponse'File'insertionPoint] :: CodeGeneratorResponse'File -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: [_CodeGeneratorResponse'File'name] :: CodeGeneratorResponse'File -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: [_CodeGeneratorResponse'error] :: CodeGeneratorResponse -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: [_CodeGeneratorResponse'file] :: CodeGeneratorResponse -> [CodeGeneratorResponse'File]
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: content :: forall msg msg'. HasField "content" msg msg' => Lens msg msg' (Field "content" msg) (Field "content" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: data CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: data CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: data CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: error :: forall msg msg'. HasField "error" msg msg' => Lens msg msg' (Field "error" msg) (Field "error" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: file :: forall msg msg'. HasField "file" msg msg' => Lens msg msg' (Field "file" msg) (Field "file" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: fileToGenerate :: forall msg msg'. HasField "fileToGenerate" msg msg' => Lens msg msg' (Field "fileToGenerate" msg) (Field "fileToGenerate" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: insertionPoint :: forall msg msg'. HasField "insertionPoint" msg msg' => Lens msg msg' (Field "insertionPoint" msg) (Field "insertionPoint" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "content" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "error" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "file" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "fileToGenerate" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "insertionPoint" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "maybe'content" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "maybe'error" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "maybe'insertionPoint" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "maybe'parameter" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "parameter" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Field.HasField "protoFile" Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorRequest
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Compiler.Plugin.CodeGeneratorResponse'File
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: maybe'content :: forall msg msg'. HasField "maybe'content" msg msg' => Lens msg msg' (Field "maybe'content" msg) (Field "maybe'content" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: maybe'error :: forall msg msg'. HasField "maybe'error" msg msg' => Lens msg msg' (Field "maybe'error" msg) (Field "maybe'error" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: maybe'insertionPoint :: forall msg msg'. HasField "maybe'insertionPoint" msg msg' => Lens msg msg' (Field "maybe'insertionPoint" msg) (Field "maybe'insertionPoint" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: maybe'name :: forall msg msg'. HasField "maybe'name" msg msg' => Lens msg msg' (Field "maybe'name" msg) (Field "maybe'name" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: maybe'parameter :: forall msg msg'. HasField "maybe'parameter" msg msg' => Lens msg msg' (Field "maybe'parameter" msg) (Field "maybe'parameter" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: name :: forall msg msg'. HasField "name" msg msg' => Lens msg msg' (Field "name" msg) (Field "name" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: parameter :: forall msg msg'. HasField "parameter" msg msg' => Lens msg msg' (Field "parameter" msg) (Field "parameter" msg')
+ Bootstrap.Proto.Google.Protobuf.Compiler.Plugin: protoFile :: forall msg msg'. HasField "protoFile" msg msg' => Lens msg msg' (Field "protoFile" msg) (Field "protoFile" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: DescriptorProto :: Maybe Text -> [FieldDescriptorProto] -> [FieldDescriptorProto] -> [DescriptorProto] -> [EnumDescriptorProto] -> [DescriptorProto'ExtensionRange] -> [OneofDescriptorProto] -> Maybe MessageOptions -> [DescriptorProto'ReservedRange] -> [Text] -> DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: DescriptorProto'ExtensionRange :: Maybe Int32 -> Maybe Int32 -> DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: DescriptorProto'ReservedRange :: Maybe Int32 -> Maybe Int32 -> DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: EnumDescriptorProto :: Maybe Text -> [EnumValueDescriptorProto] -> Maybe EnumOptions -> EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: EnumOptions :: Maybe Bool -> Maybe Bool -> [UninterpretedOption] -> EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: EnumValueDescriptorProto :: Maybe Text -> Maybe Int32 -> Maybe EnumValueOptions -> EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: EnumValueOptions :: Maybe Bool -> [UninterpretedOption] -> EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto :: Maybe Text -> Maybe Int32 -> Maybe FieldDescriptorProto'Label -> Maybe FieldDescriptorProto'Type -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Int32 -> Maybe Text -> Maybe FieldOptions -> FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'LABEL_OPTIONAL :: FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'LABEL_REPEATED :: FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'LABEL_REQUIRED :: FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_BOOL :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_BYTES :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_DOUBLE :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_ENUM :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_FIXED32 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_FIXED64 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_FLOAT :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_GROUP :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_INT32 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_INT64 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_MESSAGE :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_SFIXED32 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_SFIXED64 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_SINT32 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_SINT64 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_STRING :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_UINT32 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldDescriptorProto'TYPE_UINT64 :: FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldOptions :: Maybe FieldOptions'CType -> Maybe Bool -> Maybe FieldOptions'JSType -> Maybe Bool -> Maybe Bool -> Maybe Bool -> [UninterpretedOption] -> FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldOptions'CORD :: FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldOptions'JS_NORMAL :: FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldOptions'JS_NUMBER :: FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldOptions'JS_STRING :: FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldOptions'STRING :: FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FieldOptions'STRING_PIECE :: FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FileDescriptorProto :: Maybe Text -> Maybe Text -> [Text] -> [Int32] -> [Int32] -> [DescriptorProto] -> [EnumDescriptorProto] -> [ServiceDescriptorProto] -> [FieldDescriptorProto] -> Maybe FileOptions -> Maybe SourceCodeInfo -> Maybe Text -> FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FileDescriptorSet :: [FileDescriptorProto] -> FileDescriptorSet
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FileOptions :: Maybe Text -> Maybe Text -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe FileOptions'OptimizeMode -> Maybe Text -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Text -> Maybe Text -> [UninterpretedOption] -> FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FileOptions'CODE_SIZE :: FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FileOptions'LITE_RUNTIME :: FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: FileOptions'SPEED :: FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: GeneratedCodeInfo :: [GeneratedCodeInfo'Annotation] -> GeneratedCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: GeneratedCodeInfo'Annotation :: [Int32] -> Maybe Text -> Maybe Int32 -> Maybe Int32 -> GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: MessageOptions :: Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> [UninterpretedOption] -> MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: MethodDescriptorProto :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe MethodOptions -> Maybe Bool -> Maybe Bool -> MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: MethodOptions :: Maybe Bool -> [UninterpretedOption] -> MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: OneofDescriptorProto :: Maybe Text -> OneofDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: ServiceDescriptorProto :: Maybe Text -> [MethodDescriptorProto] -> Maybe ServiceOptions -> ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: ServiceOptions :: Maybe Bool -> [UninterpretedOption] -> ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: SourceCodeInfo :: [SourceCodeInfo'Location] -> SourceCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: SourceCodeInfo'Location :: [Int32] -> [Int32] -> Maybe Text -> Maybe Text -> [Text] -> SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: UninterpretedOption :: [UninterpretedOption'NamePart] -> Maybe Text -> Maybe Word64 -> Maybe Int64 -> Maybe Double -> Maybe ByteString -> Maybe Text -> UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: UninterpretedOption'NamePart :: Text -> Bool -> UninterpretedOption'NamePart
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'ExtensionRange'end] :: DescriptorProto'ExtensionRange -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'ExtensionRange'start] :: DescriptorProto'ExtensionRange -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'ReservedRange'end] :: DescriptorProto'ReservedRange -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'ReservedRange'start] :: DescriptorProto'ReservedRange -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'enumType] :: DescriptorProto -> [EnumDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'extensionRange] :: DescriptorProto -> [DescriptorProto'ExtensionRange]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'extension] :: DescriptorProto -> [FieldDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'field] :: DescriptorProto -> [FieldDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'name] :: DescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'nestedType] :: DescriptorProto -> [DescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'oneofDecl] :: DescriptorProto -> [OneofDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'options] :: DescriptorProto -> Maybe MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'reservedName] :: DescriptorProto -> [Text]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_DescriptorProto'reservedRange] :: DescriptorProto -> [DescriptorProto'ReservedRange]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumDescriptorProto'name] :: EnumDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumDescriptorProto'options] :: EnumDescriptorProto -> Maybe EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumDescriptorProto'value] :: EnumDescriptorProto -> [EnumValueDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumOptions'allowAlias] :: EnumOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumOptions'deprecated] :: EnumOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumOptions'uninterpretedOption] :: EnumOptions -> [UninterpretedOption]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumValueDescriptorProto'name] :: EnumValueDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumValueDescriptorProto'number] :: EnumValueDescriptorProto -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumValueDescriptorProto'options] :: EnumValueDescriptorProto -> Maybe EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumValueOptions'deprecated] :: EnumValueOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_EnumValueOptions'uninterpretedOption] :: EnumValueOptions -> [UninterpretedOption]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'defaultValue] :: FieldDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'extendee] :: FieldDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'jsonName] :: FieldDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'label] :: FieldDescriptorProto -> Maybe FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'name] :: FieldDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'number] :: FieldDescriptorProto -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'oneofIndex] :: FieldDescriptorProto -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'options] :: FieldDescriptorProto -> Maybe FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'type'] :: FieldDescriptorProto -> Maybe FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldDescriptorProto'typeName] :: FieldDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldOptions'ctype] :: FieldOptions -> Maybe FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldOptions'deprecated] :: FieldOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldOptions'jstype] :: FieldOptions -> Maybe FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldOptions'lazy] :: FieldOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldOptions'packed] :: FieldOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldOptions'uninterpretedOption] :: FieldOptions -> [UninterpretedOption]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FieldOptions'weak] :: FieldOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'dependency] :: FileDescriptorProto -> [Text]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'enumType] :: FileDescriptorProto -> [EnumDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'extension] :: FileDescriptorProto -> [FieldDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'messageType] :: FileDescriptorProto -> [DescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'name] :: FileDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'options] :: FileDescriptorProto -> Maybe FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'package] :: FileDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'publicDependency] :: FileDescriptorProto -> [Int32]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'service] :: FileDescriptorProto -> [ServiceDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'sourceCodeInfo] :: FileDescriptorProto -> Maybe SourceCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'syntax] :: FileDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorProto'weakDependency] :: FileDescriptorProto -> [Int32]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileDescriptorSet'file] :: FileDescriptorSet -> [FileDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'ccEnableArenas] :: FileOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'ccGenericServices] :: FileOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'csharpNamespace] :: FileOptions -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'deprecated] :: FileOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'goPackage] :: FileOptions -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'javaGenerateEqualsAndHash] :: FileOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'javaGenericServices] :: FileOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'javaMultipleFiles] :: FileOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'javaOuterClassname] :: FileOptions -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'javaPackage] :: FileOptions -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'javaStringCheckUtf8] :: FileOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'objcClassPrefix] :: FileOptions -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'optimizeFor] :: FileOptions -> Maybe FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'pyGenericServices] :: FileOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_FileOptions'uninterpretedOption] :: FileOptions -> [UninterpretedOption]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_GeneratedCodeInfo'Annotation'begin] :: GeneratedCodeInfo'Annotation -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_GeneratedCodeInfo'Annotation'end] :: GeneratedCodeInfo'Annotation -> Maybe Int32
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_GeneratedCodeInfo'Annotation'path] :: GeneratedCodeInfo'Annotation -> [Int32]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_GeneratedCodeInfo'Annotation'sourceFile] :: GeneratedCodeInfo'Annotation -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_GeneratedCodeInfo'annotation] :: GeneratedCodeInfo -> [GeneratedCodeInfo'Annotation]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MessageOptions'deprecated] :: MessageOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MessageOptions'mapEntry] :: MessageOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MessageOptions'messageSetWireFormat] :: MessageOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MessageOptions'noStandardDescriptorAccessor] :: MessageOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MessageOptions'uninterpretedOption] :: MessageOptions -> [UninterpretedOption]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MethodDescriptorProto'clientStreaming] :: MethodDescriptorProto -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MethodDescriptorProto'inputType] :: MethodDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MethodDescriptorProto'name] :: MethodDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MethodDescriptorProto'options] :: MethodDescriptorProto -> Maybe MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MethodDescriptorProto'outputType] :: MethodDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MethodDescriptorProto'serverStreaming] :: MethodDescriptorProto -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MethodOptions'deprecated] :: MethodOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_MethodOptions'uninterpretedOption] :: MethodOptions -> [UninterpretedOption]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_OneofDescriptorProto'name] :: OneofDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_ServiceDescriptorProto'method] :: ServiceDescriptorProto -> [MethodDescriptorProto]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_ServiceDescriptorProto'name] :: ServiceDescriptorProto -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_ServiceDescriptorProto'options] :: ServiceDescriptorProto -> Maybe ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_ServiceOptions'deprecated] :: ServiceOptions -> Maybe Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_ServiceOptions'uninterpretedOption] :: ServiceOptions -> [UninterpretedOption]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_SourceCodeInfo'Location'leadingComments] :: SourceCodeInfo'Location -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_SourceCodeInfo'Location'leadingDetachedComments] :: SourceCodeInfo'Location -> [Text]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_SourceCodeInfo'Location'path] :: SourceCodeInfo'Location -> [Int32]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_SourceCodeInfo'Location'span] :: SourceCodeInfo'Location -> [Int32]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_SourceCodeInfo'Location'trailingComments] :: SourceCodeInfo'Location -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_SourceCodeInfo'location] :: SourceCodeInfo -> [SourceCodeInfo'Location]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'NamePart'isExtension] :: UninterpretedOption'NamePart -> Bool
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'NamePart'namePart] :: UninterpretedOption'NamePart -> Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'aggregateValue] :: UninterpretedOption -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'doubleValue] :: UninterpretedOption -> Maybe Double
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'identifierValue] :: UninterpretedOption -> Maybe Text
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'name] :: UninterpretedOption -> [UninterpretedOption'NamePart]
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'negativeIntValue] :: UninterpretedOption -> Maybe Int64
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'positiveIntValue] :: UninterpretedOption -> Maybe Word64
+ Bootstrap.Proto.Google.Protobuf.Descriptor: [_UninterpretedOption'stringValue] :: UninterpretedOption -> Maybe ByteString
+ Bootstrap.Proto.Google.Protobuf.Descriptor: aggregateValue :: forall msg msg'. HasField "aggregateValue" msg msg' => Lens msg msg' (Field "aggregateValue" msg) (Field "aggregateValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: allowAlias :: forall msg msg'. HasField "allowAlias" msg msg' => Lens msg msg' (Field "allowAlias" msg) (Field "allowAlias" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: annotation :: forall msg msg'. HasField "annotation" msg msg' => Lens msg msg' (Field "annotation" msg) (Field "annotation" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: begin :: forall msg msg'. HasField "begin" msg msg' => Lens msg msg' (Field "begin" msg) (Field "begin" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: ccEnableArenas :: forall msg msg'. HasField "ccEnableArenas" msg msg' => Lens msg msg' (Field "ccEnableArenas" msg) (Field "ccEnableArenas" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: ccGenericServices :: forall msg msg'. HasField "ccGenericServices" msg msg' => Lens msg msg' (Field "ccGenericServices" msg) (Field "ccGenericServices" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: clientStreaming :: forall msg msg'. HasField "clientStreaming" msg msg' => Lens msg msg' (Field "clientStreaming" msg) (Field "clientStreaming" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: csharpNamespace :: forall msg msg'. HasField "csharpNamespace" msg msg' => Lens msg msg' (Field "csharpNamespace" msg) (Field "csharpNamespace" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: ctype :: forall msg msg'. HasField "ctype" msg msg' => Lens msg msg' (Field "ctype" msg) (Field "ctype" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FileDescriptorSet
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data GeneratedCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data OneofDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data SourceCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: data UninterpretedOption'NamePart
+ Bootstrap.Proto.Google.Protobuf.Descriptor: defaultValue :: forall msg msg'. HasField "defaultValue" msg msg' => Lens msg msg' (Field "defaultValue" msg) (Field "defaultValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: dependency :: forall msg msg'. HasField "dependency" msg msg' => Lens msg msg' (Field "dependency" msg) (Field "dependency" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: deprecated :: forall msg msg'. HasField "deprecated" msg msg' => Lens msg msg' (Field "deprecated" msg) (Field "deprecated" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: doubleValue :: forall msg msg'. HasField "doubleValue" msg msg' => Lens msg msg' (Field "doubleValue" msg) (Field "doubleValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: end :: forall msg msg'. HasField "end" msg msg' => Lens msg msg' (Field "end" msg) (Field "end" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: enumType :: forall msg msg'. HasField "enumType" msg msg' => Lens msg msg' (Field "enumType" msg) (Field "enumType" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: extendee :: forall msg msg'. HasField "extendee" msg msg' => Lens msg msg' (Field "extendee" msg) (Field "extendee" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: extension :: forall msg msg'. HasField "extension" msg msg' => Lens msg msg' (Field "extension" msg) (Field "extension" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: extensionRange :: forall msg msg'. HasField "extensionRange" msg msg' => Lens msg msg' (Field "extensionRange" msg) (Field "extensionRange" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: field :: forall msg msg'. HasField "field" msg msg' => Lens msg msg' (Field "field" msg) (Field "field" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: file :: forall msg msg'. HasField "file" msg msg' => Lens msg msg' (Field "file" msg) (Field "file" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: goPackage :: forall msg msg'. HasField "goPackage" msg msg' => Lens msg msg' (Field "goPackage" msg) (Field "goPackage" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: identifierValue :: forall msg msg'. HasField "identifierValue" msg msg' => Lens msg msg' (Field "identifierValue" msg) (Field "identifierValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: inputType :: forall msg msg'. HasField "inputType" msg msg' => Lens msg msg' (Field "inputType" msg) (Field "inputType" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorSet
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.OneofDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.Default.Class.Default Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption'NamePart
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "aggregateValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "allowAlias" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "annotation" Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "begin" Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "ccEnableArenas" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "ccGenericServices" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "clientStreaming" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "csharpNamespace" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "ctype" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "defaultValue" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "dependency" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "doubleValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "end" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "end" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "end" Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "enumType" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "enumType" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "extendee" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "extension" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "extension" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "extensionRange" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "field" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "file" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorSet Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorSet
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "goPackage" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "identifierValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "inputType" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "isExtension" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption'NamePart Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption'NamePart
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "javaGenerateEqualsAndHash" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "javaGenericServices" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "javaMultipleFiles" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "javaOuterClassname" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "javaPackage" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "javaStringCheckUtf8" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "jsonName" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "jstype" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "label" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "lazy" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "leadingComments" Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "leadingDetachedComments" Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "location" Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "mapEntry" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'aggregateValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'allowAlias" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'begin" Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'ccEnableArenas" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'ccGenericServices" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'clientStreaming" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'csharpNamespace" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'ctype" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'defaultValue" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'deprecated" Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'doubleValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'end" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'end" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'end" Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'extendee" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'goPackage" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'identifierValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'inputType" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'javaGenerateEqualsAndHash" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'javaGenericServices" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'javaMultipleFiles" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'javaOuterClassname" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'javaPackage" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'javaStringCheckUtf8" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'jsonName" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'jstype" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'label" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'lazy" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'leadingComments" Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'mapEntry" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'messageSetWireFormat" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Descriptor.OneofDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.OneofDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'name" Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'negativeIntValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'noStandardDescriptorAccessor" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'number" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'number" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'objcClassPrefix" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'oneofIndex" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'optimizeFor" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'options" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'options" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'options" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'options" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'options" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'options" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'options" Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'outputType" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'package" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'packed" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'positiveIntValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'pyGenericServices" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'serverStreaming" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'sourceCodeInfo" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'sourceFile" Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'start" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'start" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'stringValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'syntax" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'trailingComments" Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'type'" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'typeName" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "maybe'weak" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "messageSetWireFormat" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "messageType" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "method" Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.OneofDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.OneofDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "name" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "namePart" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption'NamePart Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption'NamePart
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "negativeIntValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "nestedType" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "noStandardDescriptorAccessor" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "number" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "number" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "objcClassPrefix" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "oneofDecl" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "oneofIndex" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "optimizeFor" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "options" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "options" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "options" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "options" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "options" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "options" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "options" Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "outputType" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "package" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "packed" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "path" Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "path" Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "positiveIntValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "publicDependency" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "pyGenericServices" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "reservedName" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "reservedRange" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "serverStreaming" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "service" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "sourceCodeInfo" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "sourceFile" Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "span" Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "start" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "start" Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "stringValue" Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "syntax" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "trailingComments" Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "type'" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "typeName" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "uninterpretedOption" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "uninterpretedOption" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "uninterpretedOption" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "uninterpretedOption" Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "uninterpretedOption" Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "uninterpretedOption" Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "uninterpretedOption" Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "value" Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "weak" Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Field.HasField "weakDependency" Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.FieldDefault Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.FieldDefault Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.FieldDefault Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.FieldDefault Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.FieldDefault Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorSet
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.OneofDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.Message Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption'NamePart
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.MessageEnum Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.MessageEnum Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.MessageEnum Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.MessageEnum Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance Data.ProtoLens.Message.MessageEnum Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorSet
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.OneofDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Classes.Eq Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption'NamePart
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Bounded Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Bounded Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Bounded Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Bounded Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Bounded Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Enum Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Enum Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Enum Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Enum Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Enum.Enum Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ExtensionRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.DescriptorProto'ReservedRange
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.EnumDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.EnumOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.EnumValueOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Label
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FieldDescriptorProto'Type
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'CType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FieldOptions'JSType
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FileDescriptorSet
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.FileOptions'OptimizeMode
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.GeneratedCodeInfo'Annotation
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.MessageOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.MethodDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.MethodOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.OneofDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceDescriptorProto
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.ServiceOptions
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.SourceCodeInfo'Location
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption
+ Bootstrap.Proto.Google.Protobuf.Descriptor: instance GHC.Show.Show Bootstrap.Proto.Google.Protobuf.Descriptor.UninterpretedOption'NamePart
+ Bootstrap.Proto.Google.Protobuf.Descriptor: isExtension :: forall msg msg'. HasField "isExtension" msg msg' => Lens msg msg' (Field "isExtension" msg) (Field "isExtension" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: javaGenerateEqualsAndHash :: forall msg msg'. HasField "javaGenerateEqualsAndHash" msg msg' => Lens msg msg' (Field "javaGenerateEqualsAndHash" msg) (Field "javaGenerateEqualsAndHash" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: javaGenericServices :: forall msg msg'. HasField "javaGenericServices" msg msg' => Lens msg msg' (Field "javaGenericServices" msg) (Field "javaGenericServices" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: javaMultipleFiles :: forall msg msg'. HasField "javaMultipleFiles" msg msg' => Lens msg msg' (Field "javaMultipleFiles" msg) (Field "javaMultipleFiles" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: javaOuterClassname :: forall msg msg'. HasField "javaOuterClassname" msg msg' => Lens msg msg' (Field "javaOuterClassname" msg) (Field "javaOuterClassname" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: javaPackage :: forall msg msg'. HasField "javaPackage" msg msg' => Lens msg msg' (Field "javaPackage" msg) (Field "javaPackage" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: javaStringCheckUtf8 :: forall msg msg'. HasField "javaStringCheckUtf8" msg msg' => Lens msg msg' (Field "javaStringCheckUtf8" msg) (Field "javaStringCheckUtf8" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: jsonName :: forall msg msg'. HasField "jsonName" msg msg' => Lens msg msg' (Field "jsonName" msg) (Field "jsonName" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: jstype :: forall msg msg'. HasField "jstype" msg msg' => Lens msg msg' (Field "jstype" msg) (Field "jstype" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: label :: forall msg msg'. HasField "label" msg msg' => Lens msg msg' (Field "label" msg) (Field "label" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: lazy :: forall msg msg'. HasField "lazy" msg msg' => Lens msg msg' (Field "lazy" msg) (Field "lazy" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: leadingComments :: forall msg msg'. HasField "leadingComments" msg msg' => Lens msg msg' (Field "leadingComments" msg) (Field "leadingComments" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: leadingDetachedComments :: forall msg msg'. HasField "leadingDetachedComments" msg msg' => Lens msg msg' (Field "leadingDetachedComments" msg) (Field "leadingDetachedComments" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: location :: forall msg msg'. HasField "location" msg msg' => Lens msg msg' (Field "location" msg) (Field "location" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: mapEntry :: forall msg msg'. HasField "mapEntry" msg msg' => Lens msg msg' (Field "mapEntry" msg) (Field "mapEntry" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'aggregateValue :: forall msg msg'. HasField "maybe'aggregateValue" msg msg' => Lens msg msg' (Field "maybe'aggregateValue" msg) (Field "maybe'aggregateValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'allowAlias :: forall msg msg'. HasField "maybe'allowAlias" msg msg' => Lens msg msg' (Field "maybe'allowAlias" msg) (Field "maybe'allowAlias" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'begin :: forall msg msg'. HasField "maybe'begin" msg msg' => Lens msg msg' (Field "maybe'begin" msg) (Field "maybe'begin" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'ccEnableArenas :: forall msg msg'. HasField "maybe'ccEnableArenas" msg msg' => Lens msg msg' (Field "maybe'ccEnableArenas" msg) (Field "maybe'ccEnableArenas" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'ccGenericServices :: forall msg msg'. HasField "maybe'ccGenericServices" msg msg' => Lens msg msg' (Field "maybe'ccGenericServices" msg) (Field "maybe'ccGenericServices" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'clientStreaming :: forall msg msg'. HasField "maybe'clientStreaming" msg msg' => Lens msg msg' (Field "maybe'clientStreaming" msg) (Field "maybe'clientStreaming" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'csharpNamespace :: forall msg msg'. HasField "maybe'csharpNamespace" msg msg' => Lens msg msg' (Field "maybe'csharpNamespace" msg) (Field "maybe'csharpNamespace" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'ctype :: forall msg msg'. HasField "maybe'ctype" msg msg' => Lens msg msg' (Field "maybe'ctype" msg) (Field "maybe'ctype" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'defaultValue :: forall msg msg'. HasField "maybe'defaultValue" msg msg' => Lens msg msg' (Field "maybe'defaultValue" msg) (Field "maybe'defaultValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'deprecated :: forall msg msg'. HasField "maybe'deprecated" msg msg' => Lens msg msg' (Field "maybe'deprecated" msg) (Field "maybe'deprecated" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'doubleValue :: forall msg msg'. HasField "maybe'doubleValue" msg msg' => Lens msg msg' (Field "maybe'doubleValue" msg) (Field "maybe'doubleValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'end :: forall msg msg'. HasField "maybe'end" msg msg' => Lens msg msg' (Field "maybe'end" msg) (Field "maybe'end" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'extendee :: forall msg msg'. HasField "maybe'extendee" msg msg' => Lens msg msg' (Field "maybe'extendee" msg) (Field "maybe'extendee" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'goPackage :: forall msg msg'. HasField "maybe'goPackage" msg msg' => Lens msg msg' (Field "maybe'goPackage" msg) (Field "maybe'goPackage" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'identifierValue :: forall msg msg'. HasField "maybe'identifierValue" msg msg' => Lens msg msg' (Field "maybe'identifierValue" msg) (Field "maybe'identifierValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'inputType :: forall msg msg'. HasField "maybe'inputType" msg msg' => Lens msg msg' (Field "maybe'inputType" msg) (Field "maybe'inputType" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'javaGenerateEqualsAndHash :: forall msg msg'. HasField "maybe'javaGenerateEqualsAndHash" msg msg' => Lens msg msg' (Field "maybe'javaGenerateEqualsAndHash" msg) (Field "maybe'javaGenerateEqualsAndHash" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'javaGenericServices :: forall msg msg'. HasField "maybe'javaGenericServices" msg msg' => Lens msg msg' (Field "maybe'javaGenericServices" msg) (Field "maybe'javaGenericServices" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'javaMultipleFiles :: forall msg msg'. HasField "maybe'javaMultipleFiles" msg msg' => Lens msg msg' (Field "maybe'javaMultipleFiles" msg) (Field "maybe'javaMultipleFiles" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'javaOuterClassname :: forall msg msg'. HasField "maybe'javaOuterClassname" msg msg' => Lens msg msg' (Field "maybe'javaOuterClassname" msg) (Field "maybe'javaOuterClassname" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'javaPackage :: forall msg msg'. HasField "maybe'javaPackage" msg msg' => Lens msg msg' (Field "maybe'javaPackage" msg) (Field "maybe'javaPackage" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'javaStringCheckUtf8 :: forall msg msg'. HasField "maybe'javaStringCheckUtf8" msg msg' => Lens msg msg' (Field "maybe'javaStringCheckUtf8" msg) (Field "maybe'javaStringCheckUtf8" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'jsonName :: forall msg msg'. HasField "maybe'jsonName" msg msg' => Lens msg msg' (Field "maybe'jsonName" msg) (Field "maybe'jsonName" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'jstype :: forall msg msg'. HasField "maybe'jstype" msg msg' => Lens msg msg' (Field "maybe'jstype" msg) (Field "maybe'jstype" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'label :: forall msg msg'. HasField "maybe'label" msg msg' => Lens msg msg' (Field "maybe'label" msg) (Field "maybe'label" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'lazy :: forall msg msg'. HasField "maybe'lazy" msg msg' => Lens msg msg' (Field "maybe'lazy" msg) (Field "maybe'lazy" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'leadingComments :: forall msg msg'. HasField "maybe'leadingComments" msg msg' => Lens msg msg' (Field "maybe'leadingComments" msg) (Field "maybe'leadingComments" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'mapEntry :: forall msg msg'. HasField "maybe'mapEntry" msg msg' => Lens msg msg' (Field "maybe'mapEntry" msg) (Field "maybe'mapEntry" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'messageSetWireFormat :: forall msg msg'. HasField "maybe'messageSetWireFormat" msg msg' => Lens msg msg' (Field "maybe'messageSetWireFormat" msg) (Field "maybe'messageSetWireFormat" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'name :: forall msg msg'. HasField "maybe'name" msg msg' => Lens msg msg' (Field "maybe'name" msg) (Field "maybe'name" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'negativeIntValue :: forall msg msg'. HasField "maybe'negativeIntValue" msg msg' => Lens msg msg' (Field "maybe'negativeIntValue" msg) (Field "maybe'negativeIntValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'noStandardDescriptorAccessor :: forall msg msg'. HasField "maybe'noStandardDescriptorAccessor" msg msg' => Lens msg msg' (Field "maybe'noStandardDescriptorAccessor" msg) (Field "maybe'noStandardDescriptorAccessor" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'number :: forall msg msg'. HasField "maybe'number" msg msg' => Lens msg msg' (Field "maybe'number" msg) (Field "maybe'number" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'objcClassPrefix :: forall msg msg'. HasField "maybe'objcClassPrefix" msg msg' => Lens msg msg' (Field "maybe'objcClassPrefix" msg) (Field "maybe'objcClassPrefix" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'oneofIndex :: forall msg msg'. HasField "maybe'oneofIndex" msg msg' => Lens msg msg' (Field "maybe'oneofIndex" msg) (Field "maybe'oneofIndex" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'optimizeFor :: forall msg msg'. HasField "maybe'optimizeFor" msg msg' => Lens msg msg' (Field "maybe'optimizeFor" msg) (Field "maybe'optimizeFor" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'options :: forall msg msg'. HasField "maybe'options" msg msg' => Lens msg msg' (Field "maybe'options" msg) (Field "maybe'options" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'outputType :: forall msg msg'. HasField "maybe'outputType" msg msg' => Lens msg msg' (Field "maybe'outputType" msg) (Field "maybe'outputType" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'package :: forall msg msg'. HasField "maybe'package" msg msg' => Lens msg msg' (Field "maybe'package" msg) (Field "maybe'package" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'packed :: forall msg msg'. HasField "maybe'packed" msg msg' => Lens msg msg' (Field "maybe'packed" msg) (Field "maybe'packed" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'positiveIntValue :: forall msg msg'. HasField "maybe'positiveIntValue" msg msg' => Lens msg msg' (Field "maybe'positiveIntValue" msg) (Field "maybe'positiveIntValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'pyGenericServices :: forall msg msg'. HasField "maybe'pyGenericServices" msg msg' => Lens msg msg' (Field "maybe'pyGenericServices" msg) (Field "maybe'pyGenericServices" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'serverStreaming :: forall msg msg'. HasField "maybe'serverStreaming" msg msg' => Lens msg msg' (Field "maybe'serverStreaming" msg) (Field "maybe'serverStreaming" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'sourceCodeInfo :: forall msg msg'. HasField "maybe'sourceCodeInfo" msg msg' => Lens msg msg' (Field "maybe'sourceCodeInfo" msg) (Field "maybe'sourceCodeInfo" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'sourceFile :: forall msg msg'. HasField "maybe'sourceFile" msg msg' => Lens msg msg' (Field "maybe'sourceFile" msg) (Field "maybe'sourceFile" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'start :: forall msg msg'. HasField "maybe'start" msg msg' => Lens msg msg' (Field "maybe'start" msg) (Field "maybe'start" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'stringValue :: forall msg msg'. HasField "maybe'stringValue" msg msg' => Lens msg msg' (Field "maybe'stringValue" msg) (Field "maybe'stringValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'syntax :: forall msg msg'. HasField "maybe'syntax" msg msg' => Lens msg msg' (Field "maybe'syntax" msg) (Field "maybe'syntax" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'trailingComments :: forall msg msg'. HasField "maybe'trailingComments" msg msg' => Lens msg msg' (Field "maybe'trailingComments" msg) (Field "maybe'trailingComments" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'type' :: forall msg msg'. HasField "maybe'type'" msg msg' => Lens msg msg' (Field "maybe'type'" msg) (Field "maybe'type'" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'typeName :: forall msg msg'. HasField "maybe'typeName" msg msg' => Lens msg msg' (Field "maybe'typeName" msg) (Field "maybe'typeName" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: maybe'weak :: forall msg msg'. HasField "maybe'weak" msg msg' => Lens msg msg' (Field "maybe'weak" msg) (Field "maybe'weak" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: messageSetWireFormat :: forall msg msg'. HasField "messageSetWireFormat" msg msg' => Lens msg msg' (Field "messageSetWireFormat" msg) (Field "messageSetWireFormat" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: messageType :: forall msg msg'. HasField "messageType" msg msg' => Lens msg msg' (Field "messageType" msg) (Field "messageType" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: method :: forall msg msg'. HasField "method" msg msg' => Lens msg msg' (Field "method" msg) (Field "method" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: name :: forall msg msg'. HasField "name" msg msg' => Lens msg msg' (Field "name" msg) (Field "name" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: namePart :: forall msg msg'. HasField "namePart" msg msg' => Lens msg msg' (Field "namePart" msg) (Field "namePart" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: negativeIntValue :: forall msg msg'. HasField "negativeIntValue" msg msg' => Lens msg msg' (Field "negativeIntValue" msg) (Field "negativeIntValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: nestedType :: forall msg msg'. HasField "nestedType" msg msg' => Lens msg msg' (Field "nestedType" msg) (Field "nestedType" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: noStandardDescriptorAccessor :: forall msg msg'. HasField "noStandardDescriptorAccessor" msg msg' => Lens msg msg' (Field "noStandardDescriptorAccessor" msg) (Field "noStandardDescriptorAccessor" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: number :: forall msg msg'. HasField "number" msg msg' => Lens msg msg' (Field "number" msg) (Field "number" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: objcClassPrefix :: forall msg msg'. HasField "objcClassPrefix" msg msg' => Lens msg msg' (Field "objcClassPrefix" msg) (Field "objcClassPrefix" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: oneofDecl :: forall msg msg'. HasField "oneofDecl" msg msg' => Lens msg msg' (Field "oneofDecl" msg) (Field "oneofDecl" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: oneofIndex :: forall msg msg'. HasField "oneofIndex" msg msg' => Lens msg msg' (Field "oneofIndex" msg) (Field "oneofIndex" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: optimizeFor :: forall msg msg'. HasField "optimizeFor" msg msg' => Lens msg msg' (Field "optimizeFor" msg) (Field "optimizeFor" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: options :: forall msg msg'. HasField "options" msg msg' => Lens msg msg' (Field "options" msg) (Field "options" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: outputType :: forall msg msg'. HasField "outputType" msg msg' => Lens msg msg' (Field "outputType" msg) (Field "outputType" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: package :: forall msg msg'. HasField "package" msg msg' => Lens msg msg' (Field "package" msg) (Field "package" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: packed :: forall msg msg'. HasField "packed" msg msg' => Lens msg msg' (Field "packed" msg) (Field "packed" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: path :: forall msg msg'. HasField "path" msg msg' => Lens msg msg' (Field "path" msg) (Field "path" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: positiveIntValue :: forall msg msg'. HasField "positiveIntValue" msg msg' => Lens msg msg' (Field "positiveIntValue" msg) (Field "positiveIntValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: publicDependency :: forall msg msg'. HasField "publicDependency" msg msg' => Lens msg msg' (Field "publicDependency" msg) (Field "publicDependency" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: pyGenericServices :: forall msg msg'. HasField "pyGenericServices" msg msg' => Lens msg msg' (Field "pyGenericServices" msg) (Field "pyGenericServices" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: reservedName :: forall msg msg'. HasField "reservedName" msg msg' => Lens msg msg' (Field "reservedName" msg) (Field "reservedName" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: reservedRange :: forall msg msg'. HasField "reservedRange" msg msg' => Lens msg msg' (Field "reservedRange" msg) (Field "reservedRange" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: serverStreaming :: forall msg msg'. HasField "serverStreaming" msg msg' => Lens msg msg' (Field "serverStreaming" msg) (Field "serverStreaming" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: service :: forall msg msg'. HasField "service" msg msg' => Lens msg msg' (Field "service" msg) (Field "service" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: sourceCodeInfo :: forall msg msg'. HasField "sourceCodeInfo" msg msg' => Lens msg msg' (Field "sourceCodeInfo" msg) (Field "sourceCodeInfo" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: sourceFile :: forall msg msg'. HasField "sourceFile" msg msg' => Lens msg msg' (Field "sourceFile" msg) (Field "sourceFile" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: span :: forall msg msg'. HasField "span" msg msg' => Lens msg msg' (Field "span" msg) (Field "span" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: start :: forall msg msg'. HasField "start" msg msg' => Lens msg msg' (Field "start" msg) (Field "start" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: stringValue :: forall msg msg'. HasField "stringValue" msg msg' => Lens msg msg' (Field "stringValue" msg) (Field "stringValue" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: syntax :: forall msg msg'. HasField "syntax" msg msg' => Lens msg msg' (Field "syntax" msg) (Field "syntax" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: trailingComments :: forall msg msg'. HasField "trailingComments" msg msg' => Lens msg msg' (Field "trailingComments" msg) (Field "trailingComments" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: type' :: forall msg msg'. HasField "type'" msg msg' => Lens msg msg' (Field "type'" msg) (Field "type'" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: typeName :: forall msg msg'. HasField "typeName" msg msg' => Lens msg msg' (Field "typeName" msg) (Field "typeName" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: uninterpretedOption :: forall msg msg'. HasField "uninterpretedOption" msg msg' => Lens msg msg' (Field "uninterpretedOption" msg) (Field "uninterpretedOption" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: value :: forall msg msg'. HasField "value" msg msg' => Lens msg msg' (Field "value" msg) (Field "value" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: weak :: forall msg msg'. HasField "weak" msg msg' => Lens msg msg' (Field "weak" msg) (Field "weak" msg')
+ Bootstrap.Proto.Google.Protobuf.Descriptor: weakDependency :: forall msg msg'. HasField "weakDependency" msg msg' => Lens msg msg' (Field "weakDependency" msg) (Field "weakDependency" msg')
+ Data.ProtoLens.Compiler.Combinators: (@@) :: App a => a -> a -> a
+ Data.ProtoLens.Compiler.Combinators: class App a
+ Data.ProtoLens.Compiler.Combinators: instance Data.ProtoLens.Compiler.Combinators.App Language.Haskell.Exts.Syntax.Exp
+ Data.ProtoLens.Compiler.Combinators: instance Data.ProtoLens.Compiler.Combinators.App Language.Haskell.Exts.Syntax.Type
+ Data.ProtoLens.Compiler.Combinators: instance Data.String.IsString Language.Haskell.Exts.Syntax.Exp
+ Data.ProtoLens.Compiler.Combinators: instance Data.String.IsString Language.Haskell.Exts.Syntax.ModuleName
+ Data.ProtoLens.Compiler.Combinators: instance Data.String.IsString Language.Haskell.Exts.Syntax.Name
+ Data.ProtoLens.Compiler.Combinators: instance Data.String.IsString Language.Haskell.Exts.Syntax.Pat
+ Data.ProtoLens.Compiler.Combinators: instance Data.String.IsString Language.Haskell.Exts.Syntax.QName
+ Data.ProtoLens.Compiler.Combinators: instance Data.String.IsString Language.Haskell.Exts.Syntax.TyVarBind
+ Data.ProtoLens.Compiler.Combinators: instance Data.String.IsString Language.Haskell.Exts.Syntax.Type
+ Data.ProtoLens.Compiler.Combinators: isIdentChar :: Char -> Bool
+ Data.ProtoLens.Compiler.Combinators: litFrac :: Rational -> Exp
+ Data.ProtoLens.Compiler.Combinators: litInt :: Integer -> Exp
+ Data.ProtoLens.Compiler.Combinators: match :: Name -> [Pat] -> Exp -> Match
+ Data.ProtoLens.Compiler.Combinators: pLitInt :: Integer -> Pat
+ Data.ProtoLens.Compiler.Definitions: Enum :: (EnumInfo n) -> Definition n
+ Data.ProtoLens.Compiler.Definitions: EnumInfo :: n -> EnumDescriptorProto -> [EnumValueInfo n] -> EnumInfo n
+ Data.ProtoLens.Compiler.Definitions: EnumValueInfo :: n -> EnumValueDescriptorProto -> Maybe Name -> EnumValueInfo n
+ Data.ProtoLens.Compiler.Definitions: FieldInfo :: String -> Name -> FieldDescriptorProto -> FieldInfo
+ Data.ProtoLens.Compiler.Definitions: Message :: (MessageInfo n) -> Definition n
+ Data.ProtoLens.Compiler.Definitions: MessageInfo :: n -> DescriptorProto -> [FieldInfo] -> MessageInfo n
+ Data.ProtoLens.Compiler.Definitions: [enumAliasOf] :: EnumValueInfo n -> Maybe Name
+ Data.ProtoLens.Compiler.Definitions: [enumDescriptor] :: EnumInfo n -> EnumDescriptorProto
+ Data.ProtoLens.Compiler.Definitions: [enumName] :: EnumInfo n -> n
+ Data.ProtoLens.Compiler.Definitions: [enumValueDescriptor] :: EnumValueInfo n -> EnumValueDescriptorProto
+ Data.ProtoLens.Compiler.Definitions: [enumValueName] :: EnumValueInfo n -> n
+ Data.ProtoLens.Compiler.Definitions: [enumValues] :: EnumInfo n -> [EnumValueInfo n]
+ Data.ProtoLens.Compiler.Definitions: [fieldDescriptor] :: FieldInfo -> FieldDescriptorProto
+ Data.ProtoLens.Compiler.Definitions: [messageDescriptor] :: MessageInfo n -> DescriptorProto
+ Data.ProtoLens.Compiler.Definitions: [messageFields] :: MessageInfo n -> [FieldInfo]
+ Data.ProtoLens.Compiler.Definitions: [messageName] :: MessageInfo n -> n
+ Data.ProtoLens.Compiler.Definitions: [overloadedField] :: FieldInfo -> String
+ Data.ProtoLens.Compiler.Definitions: [recordFieldName] :: FieldInfo -> Name
+ Data.ProtoLens.Compiler.Definitions: collectDefinitions :: FileDescriptorProto -> Env Name
+ Data.ProtoLens.Compiler.Definitions: data Definition n
+ Data.ProtoLens.Compiler.Definitions: data EnumInfo n
+ Data.ProtoLens.Compiler.Definitions: data EnumValueInfo n
+ Data.ProtoLens.Compiler.Definitions: data FieldInfo
+ Data.ProtoLens.Compiler.Definitions: data MessageInfo n
+ Data.ProtoLens.Compiler.Definitions: definedFieldType :: FieldDescriptorProto -> Env QName -> Definition QName
+ Data.ProtoLens.Compiler.Definitions: instance GHC.Base.Functor Data.ProtoLens.Compiler.Definitions.Definition
+ Data.ProtoLens.Compiler.Definitions: instance GHC.Base.Functor Data.ProtoLens.Compiler.Definitions.EnumInfo
+ Data.ProtoLens.Compiler.Definitions: instance GHC.Base.Functor Data.ProtoLens.Compiler.Definitions.EnumValueInfo
+ Data.ProtoLens.Compiler.Definitions: instance GHC.Base.Functor Data.ProtoLens.Compiler.Definitions.MessageInfo
+ Data.ProtoLens.Compiler.Definitions: qualifyEnv :: ModuleName -> Env Name -> Env QName
+ Data.ProtoLens.Compiler.Definitions: type Env n = Map Text (Definition n)
+ Data.ProtoLens.Compiler.Definitions: unqualifyEnv :: Env Name -> Env QName
+ Data.ProtoLens.Compiler.Generate: fileSyntaxType :: FileDescriptorProto -> SyntaxType
+ Data.ProtoLens.Compiler.Generate: generateModule :: ModuleName -> [ModuleName] -> SyntaxType -> Env Name -> Env QName -> Module
+ Data.ProtoLens.Compiler.Generate: instance GHC.Classes.Eq Data.ProtoLens.Compiler.Generate.SyntaxType
+ Data.ProtoLens.Compiler.Plugin: ProtoFile :: FileDescriptorProto -> ModuleName -> Env Name -> [ProtoFileName] -> Env QName -> ProtoFile
+ Data.ProtoLens.Compiler.Plugin: [definitions] :: ProtoFile -> Env Name
+ Data.ProtoLens.Compiler.Plugin: [descriptor] :: ProtoFile -> FileDescriptorProto
+ Data.ProtoLens.Compiler.Plugin: [exportedEnv] :: ProtoFile -> Env QName
+ Data.ProtoLens.Compiler.Plugin: [exports] :: ProtoFile -> [ProtoFileName]
+ Data.ProtoLens.Compiler.Plugin: [haskellModule] :: ProtoFile -> ModuleName
+ Data.ProtoLens.Compiler.Plugin: analyzeProtoFiles :: Text -> [FileDescriptorProto] -> Map ProtoFileName ProtoFile
+ Data.ProtoLens.Compiler.Plugin: collectEnvFromDeps :: [ProtoFileName] -> Map ProtoFileName ProtoFile -> Env QName
+ Data.ProtoLens.Compiler.Plugin: data ProtoFile
+ Data.ProtoLens.Compiler.Plugin: moduleName :: Text -> FileDescriptorProto -> ModuleName
+ Data.ProtoLens.Compiler.Plugin: moduleNameStr :: Text -> FileDescriptorProto -> String
+ Data.ProtoLens.Compiler.Plugin: outputFilePath :: String -> Text
+ Data.ProtoLens.Compiler.Plugin: type ProtoFileName = Text

Files

proto-lens-protoc.cabal view
@@ -1,9 +1,12 @@ name:                proto-lens-protoc-version:             0.1.0.1+version:             0.1.0.2 synopsis:            Protocol buffer compiler for the proto-lens library. description:   Turn protocol buffer files (.proto) into Haskell files (.hs) which   can be used with the proto-lens package.++  The library component of this package contains compiler code (namely+  Data.ProtoLens.Compiler.*) that is not guaranteed to have stable APIs. license:             BSD3 license-file:        LICENSE author:              Judah Jacobson@@ -14,7 +17,14 @@ cabal-version:       >=1.21  library-  exposed-modules:   Data.ProtoLens.Setup+  exposed-modules:+      Bootstrap.Proto.Google.Protobuf.Compiler.Plugin+      Bootstrap.Proto.Google.Protobuf.Descriptor+      Data.ProtoLens.Compiler.Combinators+      Data.ProtoLens.Compiler.Definitions+      Data.ProtoLens.Compiler.Generate+      Data.ProtoLens.Compiler.Plugin+      Data.ProtoLens.Setup   default-language:  Haskell2010   hs-source-dirs:    src   build-depends:@@ -25,29 +35,27 @@       , data-default-class == 0.0.*       , directory == 1.2.*       , filepath == 1.4.*+      , haskell-src-exts == 1.17.*       , lens-family == 1.2.*       , process >= 1.2 && < 1.5-      , proto-lens == 0.1.0.1+      , proto-lens == 0.1.0.2       , text == 1.2.*   reexported-modules:-      -- Modules that are needed by the generated Haskell files:-        Data.ByteString-      , Data.Default.Class-      , Data.Map-      , Data.ProtoLens-      , Data.ProtoLens.Message.Enum-      , Data.Text-      , Lens.Family2-      , Lens.Family2.Unchecked+      -- Modules that are needed by the generated Haskell files.+      -- For forwards compatibility, reexport them as new module names so that+      -- other packages don't accidentally write non-generated code that+      -- relies on these modules being reexported by proto-lens-protoc.+        Data.ByteString as Data.ProtoLens.Reexport.Data.ByteString+      , Data.Default.Class as Data.ProtoLens.Reexport.Data.Default.Class+      , Data.Map as Data.ProtoLens.Reexport.Data.Map+      , Data.ProtoLens as Data.ProtoLens.Reexport.Data.ProtoLens+      , Data.ProtoLens.Message.Enum as Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+      , Data.Text as Data.ProtoLens.Reexport.Data.Text+      , Lens.Family2 as Data.ProtoLens.Reexport.Lens.Family2+      , Lens.Family2.Unchecked as Data.ProtoLens.Reexport.Lens.Family2.Unchecked  executable proto-lens-protoc   main-is:  protoc-gen-haskell.hs-  other-modules:-      Bootstrap.Proto.Google.Protobuf.Compiler.Plugin-      Bootstrap.Proto.Google.Protobuf.Descriptor-      Combinators-      Definitions-      Generate    build-depends:         base >= 4.8 && < 4.10@@ -59,7 +67,15 @@       , lens-family == 1.2.*       -- Specify an exact version of `proto-lens`, since it's tied closely       -- to the generated code.-      , proto-lens == 0.1.0.1+      , proto-lens == 0.1.0.2       , text == 1.2.*   hs-source-dirs:      src+  other-modules:+      Bootstrap.Proto.Google.Protobuf.Compiler.Plugin+      Bootstrap.Proto.Google.Protobuf.Descriptor+      Data.ProtoLens.Compiler.Combinators+      Data.ProtoLens.Compiler.Definitions+      Data.ProtoLens.Compiler.Generate+      Data.ProtoLens.Compiler.Plugin+   default-language:    Haskell2010
− src/Combinators.hs
@@ -1,98 +0,0 @@--- Copyright 2016 Google Inc. All Rights Reserved.------ Use of this source code is governed by a BSD-style--- license that can be found in the LICENSE file or at--- https://developers.google.com/open-source/licenses/bsd--{-# OPTIONS_GHC -fno-warn-orphans #-}--- | Some utility functions, classes and instances for nicer code generation--- with haskell-src-exts.------ In particular, we define orphan instances of IsString for various syntax--- datatypes, with some intelligence about Haskell names.  For example, @"foo"--- :: Exp@ is treated as a variable and @"Foo" :: Exp@ is treated as a--- constructor.-module Combinators where--import Data.Char (isAlphaNum, isUpper)-import Data.String (IsString(..))-import Language.Haskell.Exts.SrcLoc (noLoc)-import Language.Haskell.Exts.Syntax as Syntax---- | Application of a Haskell type or expression to an argument.--- For example, to represent @f x y@, you can write------ > "f" @@ "x" @@ "y"-class App a where-    (@@) :: a -> a -> a-    infixl 2 @@--instance App Type where-    (@@) = TyApp--instance App Exp where-    (@@) = App--instance IsString Name where-    fromString s-        -- TODO: better handle the case of mixed ident and symbol characters.-        | all isIdentChar s = Ident s-        | otherwise = Symbol s---- | Whether this character belongs to an Ident (e.g., "foo") or a symbol--- (e.g., "<$>").-isIdentChar :: Char -> Bool-isIdentChar c = isAlphaNum c || c `elem` "_'"--instance IsString ModuleName where-    fromString = ModuleName--instance IsString QName where-    fromString f-      -- TODO: support qualified operators (e.g., "Control.Applicative.<$>")-      -- Currently we ignore them due to edge-cases-      -- like the composition operator "Prelude.."-      | isIdentChar (last f), '.' `elem` f-      -- Split "Foo.Bar.baz" into ("Foo.Bar", "baz")-      , (f', '.':f'') <- span (/='.') (reverse f)-            = Qual (fromString $ reverse f'') (fromString $ reverse f')-      | otherwise = UnQual $ fromString f--instance IsString Type where-  fromString fs@(f:_)-      | isUpper f = TyCon $ fromString fs-  fromString fs = TyVar $ fromString fs--instance IsString Exp where-    fromString fs@(f:_)-        | isUpper f = Con $ fromString fs-    fromString fs = Var $ fromString fs--instance IsString Pat where-    fromString = PVar . fromString--instance IsString TyVarBind where-    fromString = UnkindedVar . fromString----- Helper functions for literal numbers, since haskell-src-exts doesn't--- put parentheses around negative numbers automatically.--litInt :: Integer -> Exp-litInt n-    | n >= 0 = Lit $ Int n-    | otherwise = NegApp $ Lit $ Int $ negate n--litFrac :: Rational -> Exp-litFrac x-    | x >= 0 = Lit $ Frac x-    | otherwise = NegApp $ Lit $ Frac $ negate x--pLitInt :: Integer -> Pat-pLitInt n-    | n >= 0 = PLit Signless $ Int n-    | otherwise = PLit Negative $ Int $ negate n---- | A simple clause of a function binding.-match :: Name -> [Pat] -> Exp -> Match-match n ps e = Match noLoc n ps Nothing (UnGuardedRhs e) Nothing
+ src/Data/ProtoLens/Compiler/Combinators.hs view
@@ -0,0 +1,98 @@+-- Copyright 2016 Google Inc. All Rights Reserved.+--+-- Use of this source code is governed by a BSD-style+-- license that can be found in the LICENSE file or at+-- https://developers.google.com/open-source/licenses/bsd++{-# OPTIONS_GHC -fno-warn-orphans #-}+-- | Some utility functions, classes and instances for nicer code generation+-- with haskell-src-exts.+--+-- In particular, we define orphan instances of IsString for various syntax+-- datatypes, with some intelligence about Haskell names.  For example, @"foo"+-- :: Exp@ is treated as a variable and @"Foo" :: Exp@ is treated as a+-- constructor.+module Data.ProtoLens.Compiler.Combinators where++import Data.Char (isAlphaNum, isUpper)+import Data.String (IsString(..))+import Language.Haskell.Exts.SrcLoc (noLoc)+import Language.Haskell.Exts.Syntax as Syntax++-- | Application of a Haskell type or expression to an argument.+-- For example, to represent @f x y@, you can write+--+-- > "f" @@ "x" @@ "y"+class App a where+    (@@) :: a -> a -> a+    infixl 2 @@++instance App Type where+    (@@) = TyApp++instance App Exp where+    (@@) = App++instance IsString Name where+    fromString s+        -- TODO: better handle the case of mixed ident and symbol characters.+        | all isIdentChar s = Ident s+        | otherwise = Symbol s++-- | Whether this character belongs to an Ident (e.g., "foo") or a symbol+-- (e.g., "<$>").+isIdentChar :: Char -> Bool+isIdentChar c = isAlphaNum c || c `elem` "_'"++instance IsString ModuleName where+    fromString = ModuleName++instance IsString QName where+    fromString f+      -- TODO: support qualified operators (e.g., "Control.Applicative.<$>")+      -- Currently we ignore them due to edge-cases+      -- like the composition operator "Prelude.."+      | isIdentChar (last f), '.' `elem` f+      -- Split "Foo.Bar.baz" into ("Foo.Bar", "baz")+      , (f', '.':f'') <- span (/='.') (reverse f)+            = Qual (fromString $ reverse f'') (fromString $ reverse f')+      | otherwise = UnQual $ fromString f++instance IsString Type where+  fromString fs@(f:_)+      | isUpper f = TyCon $ fromString fs+  fromString fs = TyVar $ fromString fs++instance IsString Exp where+    fromString fs@(f:_)+        | isUpper f = Con $ fromString fs+    fromString fs = Var $ fromString fs++instance IsString Pat where+    fromString = PVar . fromString++instance IsString TyVarBind where+    fromString = UnkindedVar . fromString+++-- Helper functions for literal numbers, since haskell-src-exts doesn't+-- put parentheses around negative numbers automatically.++litInt :: Integer -> Exp+litInt n+    | n >= 0 = Lit $ Int n+    | otherwise = NegApp $ Lit $ Int $ negate n++litFrac :: Rational -> Exp+litFrac x+    | x >= 0 = Lit $ Frac x+    | otherwise = NegApp $ Lit $ Frac $ negate x++pLitInt :: Integer -> Pat+pLitInt n+    | n >= 0 = PLit Signless $ Int n+    | otherwise = PLit Negative $ Int $ negate n++-- | A simple clause of a function binding.+match :: Name -> [Pat] -> Exp -> Match+match n ps e = Match noLoc n ps Nothing (UnGuardedRhs e) Nothing
+ src/Data/ProtoLens/Compiler/Definitions.hs view
@@ -0,0 +1,261 @@+-- Copyright 2016 Google Inc. All Rights Reserved.+--+-- Use of this source code is governed by a BSD-style+-- license that can be found in the LICENSE file or at+-- https://developers.google.com/open-source/licenses/bsd++-- | This module takes care of collecting all the definitions in a .proto file+-- and assigning Haskell names to all of the defined things (messages, enums+-- and field names).+{-# LANGUAGE DeriveFunctor, OverloadedStrings #-}+module Data.ProtoLens.Compiler.Definitions+    ( Env+    , Definition(..)+    , MessageInfo(..)+    , FieldInfo(..)+    , EnumInfo(..)+    , EnumValueInfo(..)+    , qualifyEnv+    , unqualifyEnv+    , collectDefinitions+    , definedFieldType+    ) where++import Data.Char (toUpper)+import Data.Int (Int32)+import Data.List (mapAccumL)+import qualified Data.Map as Map+import Data.Maybe (fromMaybe)+import Data.Monoid+import qualified Data.Set as Set+import Data.Text (Text, cons, splitOn, toLower, uncons, unpack)+import qualified Data.Text as T+import Language.Haskell.Exts.Syntax (Name(..), QName(..), ModuleName(..))+import Lens.Family2 ((^.))+import Bootstrap.Proto.Google.Protobuf.Descriptor+    ( DescriptorProto+    , EnumDescriptorProto+    , EnumValueDescriptorProto+    , FieldDescriptorProto+    , FileDescriptorProto+    , enumType+    , field+    , messageType+    , name+    , nestedType+    , number+    , package+    , typeName+    , value+    )++-- | 'Env' contains a mapping of proto names (as specified in the .proto file)+-- to Haskell names.  The keys are fully-qualified names, for example,+-- ".package.Message.Submessage".  (The protocol_compiler tool emits all+-- message field types in this form, even if they refer to local definitions.)+--+-- The type 'n' can be either a 'Name' (when talking about definitions within+-- the current file) or a (qualified) 'QName' (when talking about definitions+-- either from this or another file).+type Env n = Map.Map Text (Definition n)++data Definition n = Message (MessageInfo n) | Enum (EnumInfo n)+    deriving Functor++-- | All the information needed to define or use a proto message type.+data MessageInfo n = MessageInfo+    { messageName :: n  -- ^ Haskell type name+    , messageDescriptor :: DescriptorProto+    , messageFields :: [FieldInfo]+      -- ^ The Haskell names for each field.+      -- This list corresponds 1-1 with "field" in messageDescriptor.+    } deriving Functor++-- | Information about a single field of a proto message.+data FieldInfo = FieldInfo+    { overloadedField :: String+      -- ^ The Haskell overloaded name of this field; may be shared between two+      -- different message data types.+    , recordFieldName :: Name+      -- ^ The Haskell name of this internal record field.  Unique within each+      -- module.+    , fieldDescriptor :: FieldDescriptorProto+    }++-- | All the information needed to define or use a proto enum type.+data EnumInfo n = EnumInfo+    { enumName :: n+    , enumDescriptor :: EnumDescriptorProto+    , enumValues :: [EnumValueInfo n]+    } deriving Functor++-- | Information about a single value case of a proto enum.+data EnumValueInfo n = EnumValueInfo+    { enumValueName :: n+    , enumValueDescriptor :: EnumValueDescriptorProto+    , enumAliasOf :: Maybe Name+        -- ^ If 'Nothing', we turn value into a normal constructor of the enum.+        -- If @'Just' n@, we're treating it as an alias of the constructor @n@+        -- (a PatternSynonym in Haskell).  This mirrors the behavior of the+        -- Java API.+    } deriving Functor++mapEnv :: (n -> n') -> Env n -> Env n'+mapEnv f = fmap $ fmap f++-- Lift a set of local definitions into references to a specific module.+qualifyEnv :: ModuleName -> Env Name -> Env QName+qualifyEnv m = mapEnv (Qual m)++-- Lift a set of local definitions into references to the current module.+unqualifyEnv :: Env Name -> Env QName+unqualifyEnv = mapEnv UnQual++-- | Look up the type definition for a given field.+definedFieldType :: FieldDescriptorProto -> Env QName -> Definition QName+definedFieldType fd env = fromMaybe err $ Map.lookup (fd ^. typeName) env+  where+    err = error $ "definedFieldType: Field type " ++ unpack (fd ^. typeName)+                  ++ " not found in environment."++-- | Collect all the definitions in the given file (including definitions+-- nested in other messages), and assign Haskell names to them.+collectDefinitions :: FileDescriptorProto -> Env Name+collectDefinitions fd = let+    protoPrefix = case fd ^. package of+        "" -> "."+        p -> "." <> p <> "."+    hsPrefix = ""+    in Map.fromList $ messageAndEnumDefs protoPrefix hsPrefix+                          (fd ^. messageType) (fd ^. enumType)++messageAndEnumDefs :: Text -> String -> [DescriptorProto]+                   -> [EnumDescriptorProto] -> [(Text, Definition Name)]+messageAndEnumDefs protoPrefix hsPrefix messages enums+    = concatMap (messageDefs protoPrefix hsPrefix) messages+        ++ map (enumDef protoPrefix hsPrefix) enums++-- | Generate the definitions for a message and its nested types (if any).+messageDefs :: Text -> String -> DescriptorProto+            -> [(Text, Definition Name)]+messageDefs protoPrefix hsPrefix d+    = thisDef : subDefs+  where+    protoName = d ^. name+    hsName = unpack $ capitalize $ d ^. name+    thisDef = (protoPrefix <> protoName+              , Message MessageInfo+                  { messageName = Ident $ hsPrefix ++ hsName+                  , messageDescriptor = d+                  , messageFields =+                      [ FieldInfo+                          { overloadedField = n+                          , recordFieldName = Ident $ "_" ++ hsPrefix' ++ n+                          , fieldDescriptor = f+                          }+                      | f <- d ^. field+                      , let n = fieldName (f ^. name)+                      ]+                  })+    subDefs = messageAndEnumDefs protoPrefix' hsPrefix'+                  (d ^. nestedType) (d ^. enumType)+    protoPrefix' = protoPrefix <> protoName <> "."+    hsPrefix' = hsPrefix ++ hsName ++ "'"++-- | Get the name in Haskell of a proto field, taking care of camel casing and+-- clashes with language keywords.+fieldName :: Text -> String+fieldName = unpack . disambiguate . camelCase+  where+    disambiguate s+        -- TODO: use a more comprehensive blacklist of Haskell keywords.+        | s `Set.member` reservedKeywords = s <> "'"+        | otherwise = s+    camelCase s+        -- Preserve any initial underlines (e.g., "_foo_bar" -> "_fooBar").+        | (underlines, rest) <- T.span (== '_') s+            = case splitOn "_" rest of+                -- splitOn always returns a list with at least one element.+                [] -> error $ "camelCase: splitOn returned empty list: "+                                ++ show rest+                [""] -> error "camelCase: name consists only of underscores"+                s':ss -> T.concat $ underlines : toLower s' : map capitalize ss++-- | A list of reserved keywords that aren't valid as variable names.+reservedKeywords :: Set.Set Text+reservedKeywords = Set.fromList $+    -- Haskell2010 keywords:+    -- https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-180002.4+    -- We don't include keywords that are allowed to be variable names,+    -- in particular: "as", "forall", and "hiding".+    [ "case"+    , "class"+    , "data"+    , "default"+    , "deriving"+    , "do"+    , "else"+    , "foreign"+    , "if"+    , "import"+    , "in"+    , "infix"+    , "infixl"+    , "infixr"+    , "instance"+    , "let"+    , "module"+    , "newtype"+    , "of"+    , "then"+    , "type"+    , "where"+    ]+    ++  -- Nonstandard extensions+    [ "mdo"   -- RecursiveDo+    , "rec"   -- Arrows, RecursiveDo+    , "pattern"  -- PatternSynonyms+    , "proc"  -- Arrows+    ]++-- | Generate the definition for an enum type.+enumDef :: Text -> String -> EnumDescriptorProto+          -> (Text, Definition Name)+enumDef protoPrefix hsPrefix d = let+    mkText n = protoPrefix <> n+    mkHsName n = Ident $ hsPrefix ++ unpack n+    in (mkText (d ^. name)+       , Enum EnumInfo+            { enumName = mkHsName (d ^. name)+            , enumDescriptor = d+            , enumValues = collectEnumValues mkHsName $ d ^. value+            })++-- | Generate the definitions for each enum value.  In particular, decide+-- whether it's a true constructor or a PatternSynonym to another+-- constructor.+--+-- Like Java, we treat the first case of each numeric value as the "real"+-- constructor, and subsequent cases as synonyms.+collectEnumValues :: (Text -> Name) -> [EnumValueDescriptorProto]+                  -> [EnumValueInfo Name]+collectEnumValues mkHsName = snd . mapAccumL helper Map.empty+  where+    helper :: Map.Map Int32 Name -> EnumValueDescriptorProto+           -> (Map.Map Int32 Name, EnumValueInfo Name)+    helper seenNames v+        | Just n' <- Map.lookup k seenNames = (seenNames, mkValue (Just n'))+        | otherwise = (Map.insert k hsName seenNames, mkValue Nothing)+      where+        mkValue = EnumValueInfo hsName v+        hsName = mkHsName n+        n = v ^. name+        k = v ^. number++-- Haskell types must start with an uppercase letter, so we capitalize message+-- and enum names.+-- Name collisions will show up as build errors in the generated haskell file.+capitalize :: Text -> Text+capitalize s+    | Just (c, s') <- uncons s = cons (toUpper c) s'+    | otherwise = s
+ src/Data/ProtoLens/Compiler/Generate.hs view
@@ -0,0 +1,672 @@+-- Copyright 2016 Google Inc. All Rights Reserved.+--+-- Use of this source code is governed by a BSD-style+-- license that can be found in the LICENSE file or at+-- https://developers.google.com/open-source/licenses/bsd++-- | This module builds the actual, generated Haskell file+-- for a given input .proto file.+{-# LANGUAGE OverloadedStrings #-}+module Data.ProtoLens.Compiler.Generate(+    generateModule,+    fileSyntaxType,+    ) where+++import Control.Applicative ((<$>))+import Control.Arrow (second)+import qualified Data.Foldable as F+import qualified Data.List as List+import qualified Data.Map as Map+import Data.Maybe (isNothing)+import Data.Ord (comparing)+import qualified Data.Set as Set+import Data.String (fromString)+import Data.Text (unpack)+import qualified Data.Text as T+import Data.Tuple (swap)+import Language.Haskell.Exts.Syntax as Syntax+import Language.Haskell.Exts.SrcLoc (noLoc)+import Lens.Family2 ((^.))+import Bootstrap.Proto.Google.Protobuf.Descriptor+    ( EnumValueDescriptorProto+    , FieldDescriptorProto+    , FieldDescriptorProto'Label(..)+    , FieldDescriptorProto'Type(..)+    , FileDescriptorProto+    , defaultValue+    , label+    , mapEntry+    , maybe'oneofIndex+    , name+    , number+    , options+    , packed+    , syntax+    , type'+    , typeName+    )++import Data.ProtoLens.Compiler.Combinators+import Data.ProtoLens.Compiler.Definitions++data SyntaxType = Proto2 | Proto3+    deriving Eq++fileSyntaxType :: FileDescriptorProto -> SyntaxType+fileSyntaxType f = case f ^. syntax of+    "proto2" -> Proto2+    "proto3" -> Proto3+    "" -> Proto2  -- The proto compiler doesn't set syntax for proto2 files.+    s -> error $ "Unknown syntax type " ++ show s++-- | Generate a Haskell module for the given input file(s).+-- input contains all defined names, incl. those in this module+generateModule :: ModuleName+               -> [ModuleName]  -- ^ The imported modules+               -> SyntaxType+               -> Env Name      -- ^ Definitions in this file+               -> Env QName     -- ^ Definitions in the imported modules+               -> Module+generateModule modName imports syntaxType definitions importedEnv+    = Module noLoc modName+          [ LanguagePragma noLoc $ map Ident+              ["ScopedTypeVariables", "DataKinds", "TypeFamilies",+               "MultiParamTypeClasses", "FlexibleContexts", "FlexibleInstances",+               "PatternSynonyms"]+              -- Allow unused imports in case we don't import anything from+              -- Data.Text, Data.Int, etc.+          , OptionsPragma noLoc (Just GHC) "-fno-warn-unused-imports"+          ]+          Nothing  -- no warning text+          Nothing  -- no explicit exports; we export everything.+                   -- TODO: Also export public imports, taking care not to+                   -- cause a name conflict between field accessors.+          (map importSimple+              -- Note: we import Prelude explicitly to make it qualified.+              [ "Prelude", "Data.Int", "Data.Word"]+            ++ map importReexported+                [ "Data.ProtoLens", "Data.ProtoLens.Message.Enum"+                , "Lens.Family2", "Lens.Family2.Unchecked", "Data.Default.Class"+                , "Data.Text",  "Data.Map" , "Data.ByteString"+                ]+            ++ map importSimple imports)+          (concatMap generateDecls (Map.elems definitions)+           ++ concatMap generateFieldDecls allFieldNames)+  where+    env = Map.union (unqualifyEnv definitions) importedEnv+    generateDecls (Message m) = generateMessageDecls syntaxType env m+    generateDecls (Enum e) = generateEnumDecls e+    allFieldNames = F.toList $ Set.fromList+        [ fieldSymbol i+        | Message m <- Map.elems definitions+        , f <- messageFields m+        , i <- fieldInstances (lensInfo syntaxType env f)+        ]++importSimple :: ModuleName -> ImportDecl+importSimple m = ImportDecl+    { importLoc = noLoc+    , importModule = m+    -- Import qualified to avoid clashes with names defined in this module.+    , importQualified = True+    , importSrc = False+    , importSafe = False+    , importPkg = Nothing+    , importAs = Nothing+    , importSpecs = Nothing+    }++importReexported :: ModuleName -> ImportDecl+importReexported m@(ModuleName s) = (importSimple m') { importAs = Just m }+  where+    m' = ModuleName $ "Data.ProtoLens.Reexport." ++ s++generateMessageDecls :: SyntaxType -> Env QName -> MessageInfo Name -> [Decl]+generateMessageDecls syntaxType env info =+    -- data Bar = Bar {+    --    foo :: Baz+    -- }+    [ DataDecl noLoc DataType [] dataName []+        [QualConDecl noLoc [] [] $ RecDecl dataName+                  [([recordFieldName f],+                        internalType (lensInfo syntaxType env f))+                  | f <- fields+                  ]+        ]+        [("Prelude.Show", []), ("Prelude.Eq", [])]+    ]+    +++    -- type instance Field.Field "foo" Bar = Baz+    -- instance Field.HasField "foo" Bar where+    --   field _ = ...+    -- Note: for optional fields, this generates an instance both for "foo" and+    -- for "maybe'foo" (see lensInfo below).+    concat+        [ [ TypeInsDecl noLoc+              ("Data.ProtoLens.Field" @@ sym @@ dataType)+              (fieldTypeInstance i)+          , InstDecl noLoc Nothing [] [] "Data.ProtoLens.HasField"+              [sym, dataType, dataType]+              [InsDecl $ FunBind [match "field" [PWildCard] $ fieldAccessor i]]+          ]+        | f <- fields+        , i <- fieldInstances (lensInfo syntaxType env f)+        , let sym = TyPromoted $ PromotedString $ fieldSymbol i+        ]+    +++    -- instance Data.Default.Class.Default Bar where+    [ InstDecl noLoc Nothing [] [] "Data.Default.Class.Default" [dataType]+        -- def = Bar { _Bar_foo = 0 }+        [ InsDecl $ FunBind+            [ match "def" []+                $ RecConstr (UnQual dataName)+                      [ FieldUpdate (UnQual $ recordFieldName f)+                            (hsFieldDefault syntaxType env (fieldDescriptor f))+                      | f <- fields+                      ]+            ]+        ]+    -- instance Message.Message Bar where+    , InstDecl noLoc Nothing [] [] "Data.ProtoLens.Message" [dataType]+        [ InsDecl $ FunBind+            [ match "descriptor" [] $ descriptorExpr syntaxType env info]+        ]+    ]+  where+    dataType = TyCon $ UnQual dataName+    MessageInfo { messageName = dataName, messageFields = fields} = info++generateEnumDecls :: EnumInfo Name -> [Decl]+generateEnumDecls info =+    [ DataDecl noLoc DataType [] dataName []+        [QualConDecl noLoc [] [] $ ConDecl n [] | n <- constructorNames]+        [(c, []) | c <- ["Prelude.Show", "Prelude.Eq"]]+    -- instance Data.Default.Class.Default Foo where+    --   def = FirstEnumValue+    , InstDecl noLoc Nothing [] [] "Data.Default.Class.Default" [dataType]+        [ InsDecl $ FunBind [match "def" [] defaultCon]+        ]+    -- instance Data.ProtoLens.FieldDefault Foo where+    --   fieldDefault = FirstEnumValue+    , InstDecl noLoc Nothing [] [] "Data.ProtoLens.FieldDefault" [dataType]+        [ InsDecl $ FunBind [match "fieldDefault" [] defaultCon]+        ]+    -- instance MessageEnum Foo where+    --    maybeToEnum 1 = Just Foo1+    --    maybeToEnum 2 = Just Foo2+    --    ...+    --    maybeToEnum _ = Nothing+    --    showEnum Foo1 = "Foo1"+    --    showEnum Foo2 = "Foo2"+    --    ...+    --    readEnum "Foo1" = Just Foo1+    --    readEnum "Foo2" = Just Foo2+    --    ...+    --    readEnum _ = Nothing+    , InstDecl noLoc Nothing [] [] "Data.ProtoLens.MessageEnum" [dataType]+        [ InsDecl $ FunBind $+            [ match "maybeToEnum" [pLitInt k]+                $ "Prelude.Just" @@ Con (UnQual n)+            | (n, k) <- constructorNumbers+            ]+            +++            [ match "maybeToEnum" [PWildCard] "Prelude.Nothing"+            ]+            +++            [ match "showEnum" [PVar n] $ Lit $ Syntax.String $ T.unpack pn+            | (n, pn) <- constructorProtoNames+            ]+            +++            [ match "readEnum"+                [PLit Signless . Syntax.String $ T.unpack pn]+                $ "Prelude.Just" @@ Con (UnQual n)+            | (n, pn) <- constructorProtoNames+            ]+            +++            [ match "readEnum" [PWildCard] "Prelude.Nothing"+            ]+        ]+    -- instance Enum Foo where+    --    toEnum k = maybe (error ("Foo.toEnum: unknown argument for enum Foo: "+    --                                ++ show k))+    --                  id (maybeToEnum k)+    --    fromEnum Foo1 = 1+    --    fromEnum Foo2 = 2+    --    ..+    --    succ FooN = error "Foo.succ: bad argument FooN."+    --    succ Foo1 = Foo2+    --    succ Foo2 = Foo3+    --    ..+    --    pred Foo1 = error "Foo.succ: bad argument Foo1."+    --    pred Foo2 = Foo1+    --    pred Foo3 = Foo2+    --    ..+    --    enumFrom = messageEnumFrom+    --    enumFromTo = messageEnumFromTo+    --    enumFromThen = messageEnumFromThen+    --    enumFromThenTo = messageEnumFromThenTo+    , InstDecl noLoc Nothing [] [] "Prelude.Enum" [dataType]+        [ InsDecl $ FunBind+            [ match "toEnum" ["k__"]+                  $ "Prelude.maybe" @@ errorMessageExpr @@ "Prelude.id"+                        @@ ("Data.ProtoLens.maybeToEnum" @@ "k__")+            ]+        , InsDecl $ FunBind+            [ match "fromEnum" [PApp (UnQual c) []] $ litInt k+            | (c, k) <- constructorNumbers+            ]+        , succDecl "succ" maxBoundName succPairs+        , succDecl "pred" minBoundName $ map swap succPairs+        , alias "enumFrom" "Data.ProtoLens.Message.Enum.messageEnumFrom"+        , alias "enumFromTo" "Data.ProtoLens.Message.Enum.messageEnumFromTo"+        , alias "enumFromThen" "Data.ProtoLens.Message.Enum.messageEnumFromThen"+        , alias "enumFromThenTo"+            "Data.ProtoLens.Message.Enum.messageEnumFromThenTo"+        ]+    -- instance Bounded Foo where+    --    minBound = Foo1+    --    maxBound = FooN+    , InstDecl noLoc Nothing [] [] "Prelude.Bounded" [dataType]+        [ InsDecl $ FunBind+            [ match "minBound" [] $ Con $ UnQual minBoundName+            , match "maxBound" [] $ Con $ UnQual maxBoundName+            ]+        ]+    ]+    +++    -- pattern FooAlias :: Foo+    -- pattern FooAlias = FooConstructor+    concat+        [ [ PatSynSig noLoc aliasName Nothing [] [] dataType+          , PatSyn noLoc (PVar aliasName) (PVar originalName)+                ImplicitBidirectional+          ]+        | EnumValueInfo+            { enumValueName = aliasName+            , enumAliasOf = Just originalName+            } <- enumValues info+        ]+  where+    dataType = TyCon $ UnQual dataName+    EnumInfo { enumName = dataName, enumDescriptor = ed } = info+    constructors :: [(Name, EnumValueDescriptorProto)]+    constructors = List.sortBy (comparing ((^. number) . snd))+                            [(n, d) | EnumValueInfo+                                { enumValueName = n+                                , enumValueDescriptor = d+                                , enumAliasOf = Nothing+                                } <- enumValues info+                            ]+    constructorNames = map fst constructors+    minBoundName = head constructorNames+    maxBoundName = last constructorNames++    constructorProtoNames = map (second (^. name)) constructors+    constructorNumbers = map (second (fromIntegral . (^. number)))+                          constructors++    succPairs = zip constructorNames $ tail constructorNames+    succDecl funName boundName thePairs = InsDecl $ FunBind $+        match funName [PApp (UnQual boundName) []] (+            "Prelude.error" @@ Lit (Syntax.String $ concat+                [ show dataName, ".", show funName, ": bad argument "+                , show boundName, ". This value would be out of bounds."+                ]))+        :+        [ match funName [PApp (UnQual from) []] $ Con $ UnQual to+        | (from, to) <- thePairs+        ]+    alias funName implName = InsDecl $ FunBind [match funName [] implName]++    defaultCon = Con $ UnQual $ head constructorNames+    errorMessageExpr = "Prelude.error"+                          @@ ("Prelude.++" @@ Lit (Syntax.String errorMessage)+                              @@ ("Prelude.show" @@ "k__"))+    errorMessage = "toEnum: unknown value for enum " ++ unpack (ed ^. name)+                      ++ ": "++generateFieldDecls :: String -> [Decl]+generateFieldDecls fStr =+    -- foo :: forall msg msg' . Field.HasField "foo" msg msg'+    --        => Lens.Lens msg msg' (Field.Field "foo" msg)+    --                              (Field.Field "foo" msg')+    -- foo = Field.field (Field.ProxySym :: Field.Proxy "foo")+    [ TypeSig noLoc [f]+          $ TyForall (Just ["msg", "msg'"])+                  [ClassA "Data.ProtoLens.HasField" [fSym, "msg", "msg'"]]+                  $ "Lens.Family2.Lens" @@ "msg" @@ "msg'"+                    @@ ("Data.ProtoLens.Field" @@ fSym @@ "msg")+                    @@ ("Data.ProtoLens.Field" @@ fSym @@ "msg'")+    , FunBind [match f []+                  $ "Data.ProtoLens.field"+                      @@ ExpTypeSig noLoc "Data.ProtoLens.ProxySym"+                          ("Data.ProtoLens.ProxySym" @@ fSym)+              ]+    ]+  where+    f = Ident fStr+    fSym = TyPromoted $ PromotedString fStr++------------------------------------------++-- | The Haskell types and lenses for an individual field of a message.+-- This is used to generate both the data record Decl and the instances of+-- HasField.+data LensInfo = LensInfo+    { internalType :: Type  -- ^ Internal type in the record+    , fieldInstances :: [FieldInstanceInfo]  -- ^ All instances of Field/HasField+    }++data FieldInstanceInfo = FieldInstanceInfo+    { fieldSymbol :: String      -- ^ The name of the Symbol corresponding to+                                 --   this field.+    , fieldTypeInstance :: Type  -- ^ The type instance for Field, i.e.,+                                 --     type instance Field "foo" Bar = ...+    , fieldAccessor :: Exp       -- ^ The value of the "field" lens for this+                                 --   field, i.e.,+                                 --     field _ = ...+    }++-- | Compile information about the record field type and type/class instances+-- for this particular field.+lensInfo :: SyntaxType -> Env QName -> FieldInfo -> LensInfo+lensInfo syntaxType env f = case fd ^. label of+    -- data Foo = Foo { _Foo_bar :: Bar }+    -- type instance Field "bar" Foo = Bar+    FieldDescriptorProto'LABEL_REQUIRED -> LensInfo baseType+                  [FieldInstanceInfo+                      { fieldSymbol = baseName+                      , fieldTypeInstance = baseType+                      , fieldAccessor = rawAccessor+                      }]+    FieldDescriptorProto'LABEL_OPTIONAL+        | isDefaultingOptional syntaxType fd+              -> LensInfo baseType+                    [FieldInstanceInfo+                      { fieldSymbol = baseName+                      , fieldTypeInstance = baseType+                      , fieldAccessor = rawAccessor+                      }]+    FieldDescriptorProto'LABEL_REPEATED+        -- data Foo = Foo { _Foo_bar :: Map Bar Baz }+        -- type instance Field "foo" Foo = Map Bar Baz+        | Just (k,v) <- getMapFields env fd -> let+            mapType = "Data.Map.Map" @@ hsFieldType env (fieldDescriptor k)+                                     @@ hsFieldType env (fieldDescriptor v)+            in LensInfo mapType+                  [FieldInstanceInfo+                       { fieldSymbol = baseName+                       , fieldTypeInstance = mapType+                       , fieldAccessor = rawAccessor+                       }]+        -- data Foo = Foo { _Foo_bar :: [Bar] }+        -- type instance Field "bar" Foo = [Bar]+        | otherwise -> LensInfo listType+                  [FieldInstanceInfo+                      { fieldSymbol = baseName+                      , fieldTypeInstance = listType+                      , fieldAccessor = rawAccessor+                      }]+    -- data Foo = Foo { _Foo_bar :: Maybe Bar }+    -- type instance Field "bar" Foo = Bar+    -- type instance Field "maybe'bar" Foo = Maybe Bar+    FieldDescriptorProto'LABEL_OPTIONAL -> LensInfo maybeType+                  [FieldInstanceInfo+                      { fieldSymbol = baseName+                      , fieldTypeInstance = baseType+                      , fieldAccessor = maybeAccessor+                      }+                  , FieldInstanceInfo+                      { fieldSymbol = maybeName+                      , fieldTypeInstance = "Prelude.Maybe" @@ baseType+                      , fieldAccessor = rawAccessor+                      }+                  ]+  where+    baseName = overloadedField f+    fd = fieldDescriptor f+    baseType = hsFieldType env fd+    listType = TyList baseType+    maybeType = "Prelude.Maybe" @@ baseType+    maybeName = "maybe'" ++ baseName+    maybeAccessor = "Prelude.." @@ fromString maybeName+                        @@ ("Data.ProtoLens.maybeLens"+                                @@ hsFieldValueDefault env fd)+    rawAccessor = rawFieldAccessor $ UnQual $ recordFieldName f++-- Get the key/value types of this type, if it is really a map.+getMapFields :: Env QName -> FieldDescriptorProto+             -> Maybe (FieldInfo, FieldInfo)+getMapFields env f+    | f ^. type' == FieldDescriptorProto'TYPE_MESSAGE+    , Message m@MessageInfo { messageDescriptor = d } <- definedFieldType f env+    , d ^. options.mapEntry+    , [f1, f2] <- messageFields m = Just (f1, f2)+    | otherwise = Nothing++hsFieldType :: Env QName -> FieldDescriptorProto -> Type+hsFieldType env fd = case fd ^. type' of+    FieldDescriptorProto'TYPE_DOUBLE -> "Prelude.Double"+    FieldDescriptorProto'TYPE_FLOAT -> "Prelude.Float"+    FieldDescriptorProto'TYPE_INT64 -> "Data.Int.Int64"+    FieldDescriptorProto'TYPE_UINT64 -> "Data.Word.Word64"+    FieldDescriptorProto'TYPE_INT32 -> "Data.Int.Int32"+    FieldDescriptorProto'TYPE_FIXED64 -> "Data.Word.Word64"+    FieldDescriptorProto'TYPE_FIXED32 -> "Data.Word.Word32"+    FieldDescriptorProto'TYPE_BOOL -> "Prelude.Bool"+    FieldDescriptorProto'TYPE_STRING -> "Data.Text.Text"+    FieldDescriptorProto'TYPE_GROUP+        | Message m <- definedFieldType fd env -> TyCon $ messageName m+        | otherwise -> error $ "expected TYPE_GROUP for type name"+                              ++ unpack (fd ^. typeName)+    FieldDescriptorProto'TYPE_MESSAGE+        | Message m <- definedFieldType fd env -> TyCon $ messageName m+        | otherwise -> error $ "expected TYPE_MESSAGE for type name"+                              ++ unpack (fd ^. typeName)+    FieldDescriptorProto'TYPE_BYTES -> "Data.ByteString.ByteString"+    FieldDescriptorProto'TYPE_UINT32 -> "Data.Word.Word32"+    FieldDescriptorProto'TYPE_ENUM+        | Enum e <- definedFieldType fd env -> TyCon $ enumName e+        | otherwise -> error $ "expected TYPE_ENUM for type name"+                              ++ unpack (fd ^. typeName)+    FieldDescriptorProto'TYPE_SFIXED32 -> "Data.Int.Int32"+    FieldDescriptorProto'TYPE_SFIXED64 -> "Data.Int.Int64"+    FieldDescriptorProto'TYPE_SINT32 -> "Data.Int.Int32"+    FieldDescriptorProto'TYPE_SINT64 -> "Data.Int.Int64"++hsFieldDefault :: SyntaxType -> Env QName -> FieldDescriptorProto -> Exp+hsFieldDefault syntaxType env fd+    = case fd ^. label of+          FieldDescriptorProto'LABEL_OPTIONAL+              | isDefaultingOptional syntaxType fd -> hsFieldValueDefault env fd+              | otherwise -> "Prelude.Nothing"+          FieldDescriptorProto'LABEL_REPEATED+              | Just _ <- getMapFields env fd -> "Data.Map.empty"+              | otherwise -> List []+          -- TODO: More sensible initialization of required fields.+          FieldDescriptorProto'LABEL_REQUIRED -> hsFieldValueDefault env fd++hsFieldValueDefault :: Env QName -> FieldDescriptorProto -> Exp+hsFieldValueDefault env fd = case fd ^. type' of+    FieldDescriptorProto'TYPE_MESSAGE -> "Data.Default.Class.def"+    FieldDescriptorProto'TYPE_GROUP -> "Data.Default.Class.def"+    FieldDescriptorProto'TYPE_ENUM+        | T.null def -> "Data.Default.Class.def"+        | Enum e <- definedFieldType fd env+        , Just v <- List.lookup def [ (enumValueDescriptor v ^. name, enumValueName v)+                                    | v <- enumValues e+                                    ]+            -> Con v+        | otherwise -> errorMessage "enum"+    -- The rest of the cases are for scalar fields that have a fieldDefault+    -- instance.+    _ | T.null def -> "Data.ProtoLens.fieldDefault"+    FieldDescriptorProto'TYPE_BOOL+        | def == "true" -> "Prelude.True"+        | def == "false" -> "Prelude.False"+        | otherwise -> errorMessage "bool"+    FieldDescriptorProto'TYPE_STRING+        -> "Data.Text.pack" @@ Lit (String $ T.unpack def)+    FieldDescriptorProto'TYPE_BYTES+        -> "Data.ByteString.pack"+                @@ List ((mkByte . fromEnum) <$> T.unpack def)+      where mkByte c+              | c > 0 && c < 255 = litInt $ fromIntegral c+              | otherwise = errorMessage "bytes"+    FieldDescriptorProto'TYPE_FLOAT -> defaultFrac $ T.unpack def+    FieldDescriptorProto'TYPE_DOUBLE -> defaultFrac $ T.unpack def+    -- Otherwise, assume it's an integral field:+    _ -> defaultInt $ T.unpack def+  where+    def = fd ^. defaultValue+    errorMessage fieldType+        = error $ "Bad default value " ++ show (T.unpack def)+                    ++ " in default value for " ++ fieldType ++ " field "+                    ++ unpack (fd ^. name)+    -- float/double fields can use nan, inf and -inf as default values.+    -- The Prelude doesn't provide names for them, so we implement+    -- them as division by zero.+    defaultFrac "nan" = "Prelude./" @@ litFrac 0 @@ litFrac 0+    defaultFrac "inf" = "Prelude./" @@ litFrac 1 @@ litFrac 0+    defaultFrac "-inf" = "Prelude./" @@ litFrac (negate 1) @@ litFrac 0+    defaultFrac s = case reads s of+        [(x, "")] -> litFrac $ toRational (x :: Double)+        _ -> errorMessage "fractional"+    defaultInt s = case reads s of+        [(x, "")] -> litInt x+        _ -> errorMessage "integral"++-- | A lens to access an internal field.+--+--   lens _Foo_bar (\x__ y__ -> x__ { _Foo_bar = y__ })+rawFieldAccessor :: QName -> Exp+rawFieldAccessor f = "Lens.Family2.Unchecked.lens" @@ getter @@ setter+  where+    getter = Var f+    setter = Lambda noLoc ["x__", "y__"]+                    $ RecUpdate "x__" [FieldUpdate f "y__"]++descriptorExpr :: SyntaxType -> Env QName -> MessageInfo Name -> Exp+descriptorExpr syntaxType env m+    -- let foo__field_descriptor = ...+    --     ...+    -- in Message.MessageDescriptor+    --      (Data.Map.fromList [(Tag 1, foo__field_descriptor),...])+    --      (Data.Map.fromList [("foo", foo__field_descriptor),...])+    --+    -- (Note that the two maps have the same elements but different keys.  We+    -- use the "let" expression to share elements between the two maps.)+    = Let (BDecls $ map fieldDescriptorVarBind $ messageFields m)+        $ "Data.ProtoLens.MessageDescriptor"+          @@ ("Data.Map.fromList" @@ List fieldsByTag)+          @@ ("Data.Map.fromList" @@ List fieldsByTextFormatName)+  where+    fieldsByTag =+        [Tuple Boxed+              [ t, fieldDescriptorVar f ]+              | f <- messageFields m+              , let t = "Data.ProtoLens.Tag"+                          @@ litInt (fromIntegral+                                      $ fieldDescriptor f ^. number)+              ]+    fieldsByTextFormatName =+        [Tuple Boxed+              [ t, fieldDescriptorVar f ]+              | f <- messageFields m+              , let t = Lit $ Syntax.String $ T.unpack+                            $ textFormatFieldName env (fieldDescriptor f)+              ]+    fieldDescriptorVar = fromString . fieldDescriptorName+    fieldDescriptorName f+        = fromString $ overloadedField f ++ "__field_descriptor"+    fieldDescriptorVarBind f+        = FunBind+              [match (fromString $ fieldDescriptorName f) []+                  $ fieldDescriptorExpr syntaxType env f+              ]++-- | Get the name of the field when used in a text format proto. Groups are+-- special because their text format field name is the name of their type,+-- not the name of the field in the descriptor (e.g. "Foo", not "foo").+textFormatFieldName :: Env QName -> FieldDescriptorProto -> T.Text+textFormatFieldName env descr = case descr ^. type' of+    FieldDescriptorProto'TYPE_GROUP+        | Message msg <- definedFieldType descr env+              -> messageDescriptor msg ^. name+        | otherwise -> error $ "expected TYPE_GROUP for type name"+                           ++ T.unpack (descr ^. typeName)+    _ -> descr ^. name++fieldDescriptorExpr :: SyntaxType -> Env QName -> FieldInfo+                    -> Exp+fieldDescriptorExpr syntaxType env f+    = "Data.ProtoLens.FieldDescriptor"+        -- Record the original .proto name for text format+        @@ Lit (Syntax.String (T.unpack $ fd ^. name))+        -- Force the type signature since it can't be inferred for Map entry+        -- types.+        @@ ExpTypeSig noLoc (fieldTypeDescriptorExpr (fd ^. type'))+                      ("Data.ProtoLens.FieldTypeDescriptor"+                          @@ hsFieldType env fd)+        @@ fieldAccessorExpr syntaxType env f+  where+    fd = fieldDescriptor f++fieldAccessorExpr :: SyntaxType -> Env QName -> FieldInfo -> Exp+-- (PlainField Required foo), (OptionalField foo), etc...+fieldAccessorExpr syntaxType env f = accessorCon @@ Var (UnQual hsFieldName)+  where+    fd = fieldDescriptor f+    accessorCon = case fd ^. label of+          FieldDescriptorProto'LABEL_REQUIRED+              -> "Data.ProtoLens.PlainField" @@ "Data.ProtoLens.Required"+          FieldDescriptorProto'LABEL_OPTIONAL+              | isDefaultingOptional syntaxType fd+                  -> "Data.ProtoLens.PlainField" @@ "Data.ProtoLens.Optional"+              | otherwise -> "Data.ProtoLens.OptionalField"+          FieldDescriptorProto'LABEL_REPEATED+              | Just (k, v) <- getMapFields env fd+                  -> "Data.ProtoLens.MapField"+                         @@ fromString (overloadedField k)+                         @@ fromString (overloadedField v)+              | otherwise -> "Data.ProtoLens.RepeatedField"+                  @@ if fd ^. options.packed+                        then "Data.ProtoLens.Packed"+                        else "Data.ProtoLens.Unpacked"+    hsFieldName+        = Ident $ case fd ^. label of+              FieldDescriptorProto'LABEL_OPTIONAL+                  | not (isDefaultingOptional syntaxType fd)+                      -> "maybe'" ++ overloadedField f+              _ -> overloadedField f++isDefaultingOptional :: SyntaxType -> FieldDescriptorProto -> Bool+isDefaultingOptional syntaxType f+    = f ^. label == FieldDescriptorProto'LABEL_OPTIONAL+          && syntaxType == Proto3+          && f ^. type' /= FieldDescriptorProto'TYPE_MESSAGE+          -- For now, we treat oneof's like proto2 optional fields.+          && isNothing (f ^. maybe'oneofIndex)++fieldTypeDescriptorExpr :: FieldDescriptorProto'Type -> Exp+fieldTypeDescriptorExpr =+    (\n -> fromString $ "Data.ProtoLens." ++ n ++ "Field") . \t -> case t of+    FieldDescriptorProto'TYPE_DOUBLE -> "Double"+    FieldDescriptorProto'TYPE_FLOAT -> "Float"+    FieldDescriptorProto'TYPE_INT64 -> "Int64"+    FieldDescriptorProto'TYPE_UINT64 -> "UInt64"+    FieldDescriptorProto'TYPE_INT32 -> "Int32"+    FieldDescriptorProto'TYPE_FIXED64 -> "Fixed64"+    FieldDescriptorProto'TYPE_FIXED32 -> "Fixed32"+    FieldDescriptorProto'TYPE_BOOL -> "Bool"+    FieldDescriptorProto'TYPE_STRING -> "String"+    FieldDescriptorProto'TYPE_GROUP -> "Group"+    FieldDescriptorProto'TYPE_MESSAGE -> "Message"+    FieldDescriptorProto'TYPE_BYTES -> "Bytes"+    FieldDescriptorProto'TYPE_UINT32 -> "UInt32"+    FieldDescriptorProto'TYPE_ENUM -> "Enum"+    FieldDescriptorProto'TYPE_SFIXED32 -> "SFixed32"+    FieldDescriptorProto'TYPE_SFIXED64 -> "SFixed64"+    FieldDescriptorProto'TYPE_SINT32 -> "SInt32"+    FieldDescriptorProto'TYPE_SINT64 -> "SInt64"
+ src/Data/ProtoLens/Compiler/Plugin.hs view
@@ -0,0 +1,128 @@+-- Copyright 2016 Google Inc. All Rights Reserved.+--+-- Use of this source code is governed by a BSD-style+-- license that can be found in the LICENSE file or at+-- https://developers.google.com/open-source/licenses/bsd+--+-- Code for writing protocol compiler plugins.++{-# LANGUAGE OverloadedStrings #-}+module Data.ProtoLens.Compiler.Plugin+    ( ProtoFileName+    , ProtoFile(..)+    , analyzeProtoFiles+    , collectEnvFromDeps+    , outputFilePath+    , moduleName+    , moduleNameStr+    ) where++import Data.Char (toUpper)+import Data.List (foldl', intercalate)+import qualified Data.Map.Strict as Map+import Data.Map.Strict (Map, unions, (!))+import Data.Monoid ((<>))+import qualified Data.Text as T+import Data.Text (Text)+import Language.Haskell.Exts.Syntax (ModuleName(..), Name(..), QName(..))+import Lens.Family2+import Bootstrap.Proto.Google.Protobuf.Descriptor+    (FileDescriptorProto, name, dependency, publicDependency)+import System.FilePath (dropExtension, splitDirectories)+++import Data.ProtoLens.Compiler.Definitions++-- | The filename of an input .proto file.+type ProtoFileName = Text++data ProtoFile = ProtoFile+    { descriptor :: FileDescriptorProto+    , haskellModule :: ModuleName+    , definitions :: Env Name+    -- | The names of proto files exported (transitively, via "import public"+    -- decl) by this file.+    , exports :: [ProtoFileName]+    , exportedEnv :: Env QName+    }++-- Given a list of FileDescriptorProtos, collect information about each file+-- into a map of 'ProtoFile's keyed by 'ProtoFileName'.+analyzeProtoFiles :: Text -> [FileDescriptorProto] -> Map ProtoFileName ProtoFile+analyzeProtoFiles modulePrefix files =+    Map.fromList [ (f ^. name, ingestFile f) | f <- files ]+  where+    filesByName = Map.fromList [(f ^. name, f) | f <- files]+    moduleNames = fmap (moduleName modulePrefix) filesByName+    -- The definitions in each input proto file, indexed by filename.+    definitionsByName = fmap collectDefinitions filesByName+    -- The exports from each .proto file (including any "public import"+    -- dependencies), as they appear to other modules that are importing them;+    -- i.e., qualified by module name.+    exportsByName = transitiveExports files+    localExports = Map.intersectionWith qualifyEnv moduleNames definitionsByName+    exportedEnvs = fmap (\es -> unions [localExports ! e | e <- es]) exportsByName++    ingestFile f = ProtoFile+        { descriptor = f+        , haskellModule = moduleNames ! n+        , definitions = definitionsByName ! n+        , exports = exportsByName ! n+        , exportedEnv = exportedEnvs ! n+        }+      where+        n = f ^. name++collectEnvFromDeps :: [ProtoFileName] -> Map ProtoFileName ProtoFile -> Env QName+collectEnvFromDeps deps filesByName =+    unions $ fmap (exportedEnv . (filesByName !)) deps++-- | Get the output file path (for CodeGeneratorResponse.File) for a Haskell+-- ModuleName.+outputFilePath :: String -> Text+outputFilePath n = T.replace "." "/" (T.pack n) <> ".hs"++-- | Get the Haskell 'ModuleName' corresponding to a given .proto file.+moduleName :: Text -> FileDescriptorProto -> ModuleName+moduleName modulePrefix fd = ModuleName (moduleNameStr modulePrefix fd)++-- | Get the Haskell module name corresponding to a given .proto file.+moduleNameStr :: Text -> FileDescriptorProto -> String+moduleNameStr modulePrefix fd = fixModuleName rawModuleName+  where+    path = fd ^. name+    prefix+        | T.null modulePrefix = "Proto"+        | otherwise = modulePrefix+    fixModuleName "" = ""+    -- Characters allowed in Bazel filenames but not in module names:+    fixModuleName ('.':c:cs) = '.' : toUpper c : fixModuleName cs+    fixModuleName ('_':c:cs) = toUpper c : fixModuleName cs+    fixModuleName ('-':c:cs) = toUpper c : fixModuleName cs+    fixModuleName (c:cs) = c : fixModuleName cs+    rawModuleName = intercalate "." $ (T.unpack prefix :)+                        $ splitDirectories $ dropExtension+                        $ T.unpack path++-- | Given a list of .proto files (topologically sorted), determine which+-- files' definitions are exported by which files.+--+-- Files only export their own definitions, along with the definitions exported+-- by any "import public" declarations.+transitiveExports :: [FileDescriptorProto] -> Map ProtoFileName [ProtoFileName]+-- Accumulate the transitive dependencies by folding over the files in+-- topological order.+transitiveExports = foldl' setExportsFromFile Map.empty+  where+    setExportsFromFile :: Map ProtoFileName [ProtoFileName]+                       -> FileDescriptorProto+                       -> Map ProtoFileName [ProtoFileName]+    setExportsFromFile prevExports fd+        = flip (Map.insert n) prevExports $+            n : concat [ prevExports ! ((fd ^. dependency) !! fromIntegral i)+                       -- Note that publicDependency is a list of indices into+                       -- the dependency list.+                       | i <- fd ^. publicDependency+                       ]+      where n = fd ^. name+
src/Data/ProtoLens/Setup.hs view
@@ -77,6 +77,8 @@ generatingProtos root hooks = hooks     { buildHook = \p l h f -> generateSources p l >> buildHook hooks p l h f     , haddockHook = \p l h f -> generateSources p l >> haddockHook hooks p l h f+    , replHook = \p l h f args -> generateSources p l+                                        >> replHook hooks p l h f args     , sDistHook = \p maybe_l h f -> case maybe_l of             Nothing -> error "Can't run protoc; run 'cabal configure' first."             Just l -> do
− src/Definitions.hs
@@ -1,225 +0,0 @@--- Copyright 2016 Google Inc. All Rights Reserved.------ Use of this source code is governed by a BSD-style--- license that can be found in the LICENSE file or at--- https://developers.google.com/open-source/licenses/bsd---- | This module takes care of collecting all the definitions in a .proto file--- and assigning Haskell names to all of the defined things (messages, enums--- and field names).-{-# LANGUAGE DeriveFunctor, OverloadedStrings #-}-module Definitions-    ( Env-    , Definition(..)-    , MessageInfo(..)-    , FieldInfo(..)-    , EnumInfo(..)-    , qualifyEnv-    , unqualifyEnv-    , collectDefinitions-    , definedFieldType-    ) where--import Data.Char (toUpper)-import qualified Data.Map as Map-import Data.Maybe (fromMaybe)-import Data.Monoid-import qualified Data.Set as Set-import Data.Text (Text, cons, splitOn, toLower, uncons, unpack)-import qualified Data.Text as T-import Language.Haskell.Exts.Syntax (Name(..), QName(..), ModuleName(..))-import Lens.Family2 ((^.))-import Bootstrap.Proto.Google.Protobuf.Descriptor-    ( DescriptorProto-    , EnumDescriptorProto-    , FieldDescriptorProto-    , FileDescriptorProto-    , enumType-    , field-    , messageType-    , name-    , nestedType-    , package-    , typeName-    , value-    )---- | 'Env' contains a mapping of proto names (as specified in the .proto file)--- to Haskell names.  The keys are fully-qualified names, for example,--- ".package.Message.Submessage".  (The protocol_compiler tool emits all--- message field types in this form, even if they refer to local definitions.)------ The type 'n' can be either a 'Name' (when talking about definitions within--- the current file) or a (qualified) 'QName' (when talking about definitions--- either from this or another file).-type Env n = Map.Map Text (Definition n)--data Definition n = Message (MessageInfo n) | Enum (EnumInfo n)-    deriving Functor---- | All the information needed to define or use a proto message type.-data MessageInfo n = MessageInfo-    { messageName :: n  -- ^ Haskell type name-    , messageDescriptor :: DescriptorProto-    , messageFields :: [FieldInfo]-      -- ^ The Haskell names for each field.-      -- This list corresponds 1-1 with "field" in messageDescriptor.-    } deriving Functor---- | Information about a single field of a proto message.-data FieldInfo = FieldInfo-    { overloadedField :: String-      -- ^ The Haskell overloaded name of this field; may be shared between two-      -- different message data types.-    , recordFieldName :: Name-      -- ^ The Haskell name of this internal record field.  Unique within each-      -- module.-    , fieldDescriptor :: FieldDescriptorProto-    }---- | All the information needed to define or use a proto enum type.-data EnumInfo n = EnumInfo-    { enumName :: n-    , enumDescriptor :: EnumDescriptorProto-    , enumValueNames :: [n]-      -- ^ The Haskell name of each enum value.-      -- This corresponds 1-1 with "value" in EnumDescriptorProto.-    } deriving Functor--mapEnv :: (n -> n') -> Env n -> Env n'-mapEnv f = fmap $ fmap f---- Lift a set of local definitions into references to a specific module.-qualifyEnv :: ModuleName -> Env Name -> Env QName-qualifyEnv m = mapEnv (Qual m)---- Lift a set of local definitions into references to the current module.-unqualifyEnv :: Env Name -> Env QName-unqualifyEnv = mapEnv UnQual---- | Look up the type definition for a given field.-definedFieldType :: FieldDescriptorProto -> Env QName -> Definition QName-definedFieldType fd env = fromMaybe err $ Map.lookup (fd ^. typeName) env-  where-    err = error $ "definedFieldType: Field type " ++ unpack (fd ^. typeName)-                  ++ " not found in environment."---- | Collect all the definitions in the given file (including definitions--- nested in other messages), and assign Haskell names to them.-collectDefinitions :: FileDescriptorProto -> Env Name-collectDefinitions fd = let-    protoPrefix = case fd ^. package of-        "" -> "."-        p -> "." <> p <> "."-    hsPrefix = ""-    in Map.fromList $ messageAndEnumDefs protoPrefix hsPrefix-                          (fd ^. messageType) (fd ^. enumType)--messageAndEnumDefs :: Text -> String -> [DescriptorProto]-                   -> [EnumDescriptorProto] -> [(Text, Definition Name)]-messageAndEnumDefs protoPrefix hsPrefix messages enums-    = concatMap (messageDefs protoPrefix hsPrefix) messages-        ++ map (enumDef protoPrefix hsPrefix) enums---- | Generate the definitions for a message and its nested types (if any).-messageDefs :: Text -> String -> DescriptorProto-            -> [(Text, Definition Name)]-messageDefs protoPrefix hsPrefix d-    = thisDef : subDefs-  where-    protoName = d ^. name-    hsName = unpack $ capitalize $ d ^. name-    thisDef = (protoPrefix <> protoName-              , Message MessageInfo-                  { messageName = Ident $ hsPrefix ++ hsName-                  , messageDescriptor = d-                  , messageFields =-                      [ FieldInfo-                          { overloadedField = n-                          , recordFieldName = Ident $ "_" ++ hsPrefix' ++ n-                          , fieldDescriptor = f-                          }-                      | f <- d ^. field-                      , let n = fieldName (f ^. name)-                      ]-                  })-    subDefs = messageAndEnumDefs protoPrefix' hsPrefix'-                  (d ^. nestedType) (d ^. enumType)-    protoPrefix' = protoPrefix <> protoName <> "."-    hsPrefix' = hsPrefix ++ hsName ++ "'"---- | Get the name in Haskell of a proto field, taking care of camel casing and--- clashes with language keywords.-fieldName :: Text -> String-fieldName = unpack . disambiguate . camelCase-  where-    disambiguate s-        -- TODO: use a more comprehensive blacklist of Haskell keywords.-        | s `Set.member` reservedKeywords = s <> "'"-        | otherwise = s-    camelCase s-        -- Preserve any initial underlines (e.g., "_foo_bar" -> "_fooBar").-        | (underlines, rest) <- T.span (== '_') s-            = case splitOn "_" rest of-                -- splitOn always returns a list with at least one element.-                [] -> error $ "camelCase: splitOn returned empty list: "-                                ++ show rest-                [""] -> error "camelCase: name consists only of underscores"-                s':ss -> T.concat $ underlines : toLower s' : map capitalize ss---- | A list of reserved keywords that aren't valid as variable names.-reservedKeywords :: Set.Set Text-reservedKeywords = Set.fromList $-    -- Haskell2010 keywords:-    -- https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-180002.4-    -- We don't include keywords that are allowed to be variable names,-    -- in particular: "as", "forall", and "hiding".-    [ "case"-    , "class"-    , "data"-    , "default"-    , "deriving"-    , "do"-    , "else"-    , "foreign"-    , "if"-    , "import"-    , "in"-    , "infix"-    , "infixl"-    , "infixr"-    , "instance"-    , "let"-    , "module"-    , "newtype"-    , "of"-    , "then"-    , "type"-    , "where"-    ]-    ++  -- Nonstandard extensions-    [ "mdo"   -- RecursiveDo-    , "rec"   -- Arrows, RecursiveDo-    , "proc"  -- Arrows-    ]---- | Generate the definition for an enum type.-enumDef :: Text -> String -> EnumDescriptorProto-          -> (Text, Definition Name)-enumDef protoPrefix hsPrefix d = let-    mkText n = protoPrefix <> n-    mkHsName n = Ident $ hsPrefix ++ unpack n-    in (mkText (d ^. name)-       , Enum EnumInfo-            { enumName = mkHsName (d ^. name)-            , enumDescriptor = d-            , enumValueNames = fmap (mkHsName . (^. name)) (d ^. value)-            })---- Haskell types must start with an uppercase letter, so we capitalize message--- and enum names.--- Name collisions will show up as build errors in the generated haskell file.-capitalize :: Text -> Text-capitalize s-    | Just (c, s') <- uncons s = cons (toUpper c) s'-    | otherwise = s
− src/Generate.hs
@@ -1,648 +0,0 @@--- Copyright 2016 Google Inc. All Rights Reserved.------ Use of this source code is governed by a BSD-style--- license that can be found in the LICENSE file or at--- https://developers.google.com/open-source/licenses/bsd---- | This module builds the actual, generated Haskell file--- for a given input .proto file.-{-# LANGUAGE OverloadedStrings #-}-module Generate(-    generateModule,-    fileSyntaxType,-    ) where---import Control.Applicative ((<$>))-import Control.Arrow (second)-import qualified Data.Foldable as F-import qualified Data.List as List-import qualified Data.Map as Map-import Data.Maybe (isNothing)-import Data.Ord (comparing)-import qualified Data.Set as Set-import Data.String (fromString)-import Data.Text (unpack)-import qualified Data.Text as T-import Data.Tuple (swap)-import Language.Haskell.Exts.Syntax as Syntax-import Language.Haskell.Exts.SrcLoc (noLoc)-import Lens.Family2 ((^.))-import Bootstrap.Proto.Google.Protobuf.Descriptor-    ( FieldDescriptorProto-    , FieldDescriptorProto'Label(..)-    , FieldDescriptorProto'Type(..)-    , FileDescriptorProto-    , defaultValue-    , label-    , mapEntry-    , maybe'oneofIndex-    , name-    , number-    , options-    , packed-    , syntax-    , type'-    , typeName-    , value-    )--import Combinators-import Definitions--data SyntaxType = Proto2 | Proto3-    deriving Eq--fileSyntaxType :: FileDescriptorProto -> SyntaxType-fileSyntaxType f = case f ^. syntax of-    "proto2" -> Proto2-    "proto3" -> Proto3-    "" -> Proto2  -- The proto compiler doesn't set syntax for proto2 files.-    s -> error $ "Unknown syntax type " ++ show s---- | Generate a Haskell module for the given input file(s).--- input contains all defined names, incl. those in this module-generateModule :: ModuleName-               -> [ModuleName]  -- ^ The imported modules-               -> SyntaxType-               -> Env Name      -- ^ Definitions in this file-               -> Env QName     -- ^ Definitions in the imported modules-               -> Module-generateModule modName imports syntaxType definitions importedEnv-    = Module noLoc modName-          [ LanguagePragma noLoc $ map Ident-              ["ScopedTypeVariables", "DataKinds", "TypeFamilies",-               "MultiParamTypeClasses", "FlexibleContexts", "FlexibleInstances"]-              -- Allow unused imports in case we don't import anything from-              -- Data.Text, Data.Int, etc.-          , OptionsPragma noLoc (Just GHC) "-fno-warn-unused-imports"-          ]-          Nothing  -- no warning text-          Nothing  -- no explicit exports; we export everything.-                   -- TODO: Also export public imports, taking care not to-                   -- cause a name conflict between field accessors.-          (map importDecl-              -- Note: we import Prelude explicitly to make it qualified.-              $ [ "Prelude", "Data.ProtoLens", "Data.ProtoLens.Message.Enum"-                , "Lens.Family2", "Lens.Family2.Unchecked", "Data.Default.Class"-                , "Data.Text", "Data.Int"-                , "Data.Word", "Data.Map" , "Data.ByteString"-                ]-                ++ imports)-          (concatMap generateDecls (Map.elems definitions)-           ++ concatMap generateFieldDecls allFieldNames)-  where-    env = Map.union (unqualifyEnv definitions) importedEnv-    generateDecls (Message m) = generateMessageDecls syntaxType env m-    generateDecls (Enum e) = generateEnumDecls e-    allFieldNames = F.toList $ Set.fromList-        [ fieldSymbol i-        | Message m <- Map.elems definitions-        , f <- messageFields m-        , i <- fieldInstances (lensInfo syntaxType env f)-        ]--importDecl :: ModuleName -> ImportDecl-importDecl m = ImportDecl-    { importLoc = noLoc-    , importModule = m-    -- Import qualified to avoid clashes with names defined in this module.-    , importQualified = True-    , importSrc = False-    , importSafe = False-    , importPkg = Nothing-    , importAs = Nothing-    , importSpecs = Nothing-    }--generateMessageDecls :: SyntaxType -> Env QName -> MessageInfo Name -> [Decl]-generateMessageDecls syntaxType env info =-    -- data Bar = Bar {-    --    foo :: Baz-    -- }-    [ DataDecl noLoc DataType [] dataName []-        [QualConDecl noLoc [] [] $ RecDecl dataName-                  [([recordFieldName f],-                        internalType (lensInfo syntaxType env f))-                  | f <- fields-                  ]-        ]-        [("Prelude.Show", []), ("Prelude.Eq", [])]-    ]-    ++-    -- type instance Field.Field "foo" Bar = Baz-    -- instance Field.HasField "foo" Bar where-    --   field _ = ...-    -- Note: for optional fields, this generates an instance both for "foo" and-    -- for "maybe'foo" (see lensInfo below).-    concat-        [ [ TypeInsDecl noLoc-              ("Data.ProtoLens.Field" @@ sym @@ dataType)-              (fieldTypeInstance i)-          , InstDecl noLoc Nothing [] [] "Data.ProtoLens.HasField"-              [sym, dataType, dataType]-              [InsDecl $ FunBind [match "field" [PWildCard] $ fieldAccessor i]]-          ]-        | f <- fields-        , i <- fieldInstances (lensInfo syntaxType env f)-        , let sym = TyPromoted $ PromotedString $ fieldSymbol i-        ]-    ++-    -- instance Data.Default.Class.Default Bar where-    [ InstDecl noLoc Nothing [] [] "Data.Default.Class.Default" [dataType]-        -- def = Bar { _Bar_foo = 0 }-        [ InsDecl $ FunBind-            [ match "def" []-                $ RecConstr (UnQual dataName)-                      [ FieldUpdate (UnQual $ recordFieldName f)-                            (hsFieldDefault syntaxType env (fieldDescriptor f))-                      | f <- fields-                      ]-            ]-        ]-    -- instance Message.Message Bar where-    , InstDecl noLoc Nothing [] [] "Data.ProtoLens.Message" [dataType]-        [ InsDecl $ FunBind-            [ match "descriptor" [] $ descriptorExpr syntaxType env info]-        ]-    ]-  where-    dataType = TyCon $ UnQual dataName-    MessageInfo { messageName = dataName, messageFields = fields} = info--generateEnumDecls :: EnumInfo Name -> [Decl]-generateEnumDecls info =-    [ DataDecl noLoc DataType [] dataName []-        [QualConDecl noLoc [] [] $ ConDecl n [] | (n, _) <- values]-        [(c, []) | c <- ["Prelude.Show", "Prelude.Eq"]]-    -- instance Data.Default.Class.Default Foo where-    --   def = FirstEnumValue-    , InstDecl noLoc Nothing [] [] "Data.Default.Class.Default" [dataType]-        [ InsDecl $ FunBind [match "def" [] defaultCon]-        ]-    -- instance Data.ProtoLens.FieldDefault Foo where-    --   fieldDefault = FirstEnumValue-    , InstDecl noLoc Nothing [] [] "Data.ProtoLens.FieldDefault" [dataType]-        [ InsDecl $ FunBind [match "fieldDefault" [] defaultCon]-        ]-    -- instance MessageEnum Foo where-    --    maybeToEnum 1 = Just Foo1-    --    maybeToEnum 2 = Just Foo2-    --    ...-    --    maybeToEnum _ = Nothing-    --    showEnum Foo1 = "Foo1"-    --    showEnum Foo2 = "Foo2"-    --    ...-    --    readEnum "Foo1" = Just Foo1-    --    readEnum "Foo2" = Just Foo2-    --    ...-    --    readEnum _ = Nothing-    , InstDecl noLoc Nothing [] [] "Data.ProtoLens.MessageEnum" [dataType]-        [ InsDecl $ FunBind $-            [ match "maybeToEnum" [pLitInt k] $ "Prelude.Just" @@ Con (UnQual n)-            | (n, k) <- values-            ]-            ++-            [ match "maybeToEnum" [PWildCard] "Prelude.Nothing"-            ]-            ++-            [ match "showEnum" [PVar n] $ Lit $ Syntax.String $ T.unpack ev-            | (n, ev) <- names-            ]-            ++-            [ match "readEnum"-                [PLit Signless . Syntax.String $ T.unpack ev]-                $ "Prelude.Just" @@ Con (UnQual n)-            | (n, ev) <- names-            ]-            ++-            [ match "readEnum" [PWildCard] "Prelude.Nothing"-            ]-        ]-    -- instance Enum Foo where-    --    toEnum k = maybe (error ("Foo.toEnum: unknown argument for enum Foo: "-    --                                ++ show k))-    --                  id (maybeToEnum k)-    --    fromEnum Foo1 = 1-    --    fromEnum Foo2 = 2-    --    ..-    --    succ FooN = error "Foo.succ: bad argument FooN."-    --    succ Foo1 = Foo2-    --    succ Foo2 = Foo3-    --    ..-    --    pred Foo1 = error "Foo.succ: bad argument Foo1."-    --    pred Foo2 = Foo1-    --    pred Foo3 = Foo2-    --    ..-    --    enumFrom = messageEnumFrom-    --    enumFromTo = messageEnumFromTo-    --    enumFromThen = messageEnumFromThen-    --    enumFromThenTo = messageEnumFromThenTo-    , InstDecl noLoc Nothing [] [] "Prelude.Enum" [dataType]-        [ InsDecl $ FunBind-            [ match "toEnum" ["k__"]-                  $ "Prelude.maybe" @@ errorMessageExpr @@ "Prelude.id"-                        @@ ("Data.ProtoLens.maybeToEnum" @@ "k__")-            ]-        , InsDecl $ FunBind-            [ match "fromEnum" [PApp (UnQual c) []] $ litInt k-            | (c, k) <- values-            ]-        , succDecl "succ" maxBoundName succPairs-        , succDecl "pred" minBoundName $ map swap succPairs-        , alias "enumFrom" "Data.ProtoLens.Message.Enum.messageEnumFrom"-        , alias "enumFromTo" "Data.ProtoLens.Message.Enum.messageEnumFromTo"-        , alias "enumFromThen" "Data.ProtoLens.Message.Enum.messageEnumFromThen"-        , alias "enumFromThenTo"-            "Data.ProtoLens.Message.Enum.messageEnumFromThenTo"-        ]-    -- instance Bounded Foo where-    --    minBound = Foo1-    --    maxBound = FooN-    , InstDecl noLoc Nothing [] [] "Prelude.Bounded" [dataType]-        [ InsDecl $ FunBind-            [ match "minBound" [] $ Con $ UnQual minBoundName-            , match "maxBound" [] $ Con $ UnQual maxBoundName-            ]-        ]-    ]-  where-    dataType = TyCon $ UnQual dataName-    EnumInfo-        { enumName = dataName-        , enumValueNames = valueNames-        , enumDescriptor = ed-        } = info-    namesAndValues = zip valueNames (ed ^. value)-    names = map (second (^. name)) namesAndValues-    values = List.sortBy (comparing snd) $-        map (second (fromIntegral . (^. number))) namesAndValues-    minBoundName = fst $ head values-    maxBoundName = fst $ last values--    succPairs = zip ctorNames $ tail ctorNames-      where ctorNames = map fst values-    succDecl funName boundName thePairs = InsDecl $ FunBind $-        match funName [PApp (UnQual boundName) []] (-            "Prelude.error" @@ Lit (Syntax.String $ concat-                [ show dataName, ".", show funName, ": bad argument "-                , show boundName, ". This value would be out of bounds."-                ]))-        :-        [ match funName [PApp (UnQual from) []] $ Con $ UnQual to-        | (from, to) <- thePairs-        ]-    alias funName implName = InsDecl $ FunBind [match funName [] implName]--    defaultCon = Con $ UnQual $ fst $ head names-    errorMessageExpr = "Prelude.error"-                          @@ ("Prelude.++" @@ Lit (Syntax.String errorMessage)-                              @@ ("Prelude.show" @@ "k__"))-    errorMessage = "toEnum: unknown value for enum " ++ unpack (ed ^. name)-                      ++ ": "--generateFieldDecls :: String -> [Decl]-generateFieldDecls fStr =-    -- foo :: forall msg msg' . Field.HasField "foo" msg msg'-    --        => Lens.Lens msg msg' (Field.Field "foo" msg)-    --                              (Field.Field "foo" msg')-    -- foo = Field.field (Field.ProxySym :: Field.Proxy "foo")-    [ TypeSig noLoc [f]-          $ TyForall (Just ["msg", "msg'"])-                  [ClassA "Data.ProtoLens.HasField" [fSym, "msg", "msg'"]]-                  $ "Lens.Family2.Lens" @@ "msg" @@ "msg'"-                    @@ ("Data.ProtoLens.Field" @@ fSym @@ "msg")-                    @@ ("Data.ProtoLens.Field" @@ fSym @@ "msg'")-    , FunBind [match f []-                  $ "Data.ProtoLens.field"-                      @@ ExpTypeSig noLoc "Data.ProtoLens.ProxySym"-                          ("Data.ProtoLens.ProxySym" @@ fSym)-              ]-    ]-  where-    f = Ident fStr-    fSym = TyPromoted $ PromotedString fStr------------------------------------------------ | The Haskell types and lenses for an individual field of a message.--- This is used to generate both the data record Decl and the instances of--- HasField.-data LensInfo = LensInfo-    { internalType :: Type  -- ^ Internal type in the record-    , fieldInstances :: [FieldInstanceInfo]  -- ^ All instances of Field/HasField-    }--data FieldInstanceInfo = FieldInstanceInfo-    { fieldSymbol :: String      -- ^ The name of the Symbol corresponding to-                                 --   this field.-    , fieldTypeInstance :: Type  -- ^ The type instance for Field, i.e.,-                                 --     type instance Field "foo" Bar = ...-    , fieldAccessor :: Exp       -- ^ The value of the "field" lens for this-                                 --   field, i.e.,-                                 --     field _ = ...-    }---- | Compile information about the record field type and type/class instances--- for this particular field.-lensInfo :: SyntaxType -> Env QName -> FieldInfo -> LensInfo-lensInfo syntaxType env f = case fd ^. label of-    -- data Foo = Foo { _Foo_bar :: Bar }-    -- type instance Field "bar" Foo = Bar-    FieldDescriptorProto'LABEL_REQUIRED -> LensInfo baseType-                  [FieldInstanceInfo-                      { fieldSymbol = baseName-                      , fieldTypeInstance = baseType-                      , fieldAccessor = rawAccessor-                      }]-    FieldDescriptorProto'LABEL_OPTIONAL-        | isDefaultingOptional syntaxType fd-              -> LensInfo baseType-                    [FieldInstanceInfo-                      { fieldSymbol = baseName-                      , fieldTypeInstance = baseType-                      , fieldAccessor = rawAccessor-                      }]-    FieldDescriptorProto'LABEL_REPEATED-        -- data Foo = Foo { _Foo_bar :: Map Bar Baz }-        -- type instance Field "foo" Foo = Map Bar Baz-        | Just (k,v) <- getMapFields env fd -> let-            mapType = "Data.Map.Map" @@ hsFieldType env (fieldDescriptor k)-                                     @@ hsFieldType env (fieldDescriptor v)-            in LensInfo mapType-                  [FieldInstanceInfo-                       { fieldSymbol = baseName-                       , fieldTypeInstance = mapType-                       , fieldAccessor = rawAccessor-                       }]-        -- data Foo = Foo { _Foo_bar :: [Bar] }-        -- type instance Field "bar" Foo = [Bar]-        | otherwise -> LensInfo listType-                  [FieldInstanceInfo-                      { fieldSymbol = baseName-                      , fieldTypeInstance = listType-                      , fieldAccessor = rawAccessor-                      }]-    -- data Foo = Foo { _Foo_bar :: Maybe Bar }-    -- type instance Field "bar" Foo = Bar-    -- type instance Field "maybe'bar" Foo = Maybe Bar-    FieldDescriptorProto'LABEL_OPTIONAL -> LensInfo maybeType-                  [FieldInstanceInfo-                      { fieldSymbol = baseName-                      , fieldTypeInstance = baseType-                      , fieldAccessor = maybeAccessor-                      }-                  , FieldInstanceInfo-                      { fieldSymbol = maybeName-                      , fieldTypeInstance = "Prelude.Maybe" @@ baseType-                      , fieldAccessor = rawAccessor-                      }-                  ]-  where-    baseName = overloadedField f-    fd = fieldDescriptor f-    baseType = hsFieldType env fd-    listType = TyList baseType-    maybeType = "Prelude.Maybe" @@ baseType-    maybeName = "maybe'" ++ baseName-    maybeAccessor = "Prelude.." @@ fromString maybeName-                        @@ ("Data.ProtoLens.maybeLens"-                                @@ hsFieldValueDefault env fd)-    rawAccessor = rawFieldAccessor $ UnQual $ recordFieldName f---- Get the key/value types of this type, if it is really a map.-getMapFields :: Env QName -> FieldDescriptorProto-             -> Maybe (FieldInfo, FieldInfo)-getMapFields env f-    | f ^. type' == FieldDescriptorProto'TYPE_MESSAGE-    , Message m@MessageInfo { messageDescriptor = d } <- definedFieldType f env-    , d ^. options.mapEntry-    , [f1, f2] <- messageFields m = Just (f1, f2)-    | otherwise = Nothing--hsFieldType :: Env QName -> FieldDescriptorProto -> Type-hsFieldType env fd = case fd ^. type' of-    FieldDescriptorProto'TYPE_DOUBLE -> "Prelude.Double"-    FieldDescriptorProto'TYPE_FLOAT -> "Prelude.Float"-    FieldDescriptorProto'TYPE_INT64 -> "Data.Int.Int64"-    FieldDescriptorProto'TYPE_UINT64 -> "Data.Word.Word64"-    FieldDescriptorProto'TYPE_INT32 -> "Data.Int.Int32"-    FieldDescriptorProto'TYPE_FIXED64 -> "Data.Word.Word64"-    FieldDescriptorProto'TYPE_FIXED32 -> "Data.Word.Word32"-    FieldDescriptorProto'TYPE_BOOL -> "Prelude.Bool"-    FieldDescriptorProto'TYPE_STRING -> "Data.Text.Text"-    FieldDescriptorProto'TYPE_GROUP-        | Message m <- definedFieldType fd env -> TyCon $ messageName m-        | otherwise -> error $ "expected TYPE_GROUP for type name"-                              ++ unpack (fd ^. typeName)-    FieldDescriptorProto'TYPE_MESSAGE-        | Message m <- definedFieldType fd env -> TyCon $ messageName m-        | otherwise -> error $ "expected TYPE_MESSAGE for type name"-                              ++ unpack (fd ^. typeName)-    FieldDescriptorProto'TYPE_BYTES -> "Data.ByteString.ByteString"-    FieldDescriptorProto'TYPE_UINT32 -> "Data.Word.Word32"-    FieldDescriptorProto'TYPE_ENUM-        | Enum e <- definedFieldType fd env -> TyCon $ enumName e-        | otherwise -> error $ "expected TYPE_ENUM for type name"-                              ++ unpack (fd ^. typeName)-    FieldDescriptorProto'TYPE_SFIXED32 -> "Data.Int.Int32"-    FieldDescriptorProto'TYPE_SFIXED64 -> "Data.Int.Int64"-    FieldDescriptorProto'TYPE_SINT32 -> "Data.Int.Int32"-    FieldDescriptorProto'TYPE_SINT64 -> "Data.Int.Int64"--hsFieldDefault :: SyntaxType -> Env QName -> FieldDescriptorProto -> Exp-hsFieldDefault syntaxType env fd-    = case fd ^. label of-          FieldDescriptorProto'LABEL_OPTIONAL-              | isDefaultingOptional syntaxType fd -> hsFieldValueDefault env fd-              | otherwise -> "Prelude.Nothing"-          FieldDescriptorProto'LABEL_REPEATED-              | Just _ <- getMapFields env fd -> "Data.Map.empty"-              | otherwise -> List []-          -- TODO: More sensible initialization of required fields.-          FieldDescriptorProto'LABEL_REQUIRED -> hsFieldValueDefault env fd--hsFieldValueDefault :: Env QName -> FieldDescriptorProto -> Exp-hsFieldValueDefault env fd = case fd ^. type' of-    FieldDescriptorProto'TYPE_MESSAGE -> "Data.Default.Class.def"-    FieldDescriptorProto'TYPE_GROUP -> "Data.Default.Class.def"-    FieldDescriptorProto'TYPE_ENUM-        | T.null def -> "Data.Default.Class.def"-        | Enum e <- definedFieldType fd env-        , Just v <- List.lookup def [ (vd ^. name, n)-                                    | (vd, n) <- zip (enumDescriptor e ^. value)-                                                     (enumValueNames e)-                                    ]-            -> Con v-        | otherwise -> errorMessage "enum"-    -- The rest of the cases are for scalar fields that have a fieldDefault-    -- instance.-    _ | T.null def -> "Data.ProtoLens.fieldDefault"-    FieldDescriptorProto'TYPE_BOOL-        | def == "true" -> "Prelude.True"-        | def == "false" -> "Prelude.False"-        | otherwise -> errorMessage "bool"-    FieldDescriptorProto'TYPE_STRING-        -> "Data.Text.pack" @@ Lit (String $ T.unpack def)-    FieldDescriptorProto'TYPE_BYTES-        -> "Data.ByteString.pack"-                @@ List ((mkByte . fromEnum) <$> T.unpack def)-      where mkByte c-              | c > 0 && c < 255 = litInt $ fromIntegral c-              | otherwise = errorMessage "bytes"-    FieldDescriptorProto'TYPE_FLOAT -> defaultFrac $ T.unpack def-    FieldDescriptorProto'TYPE_DOUBLE -> defaultFrac $ T.unpack def-    -- Otherwise, assume it's an integral field:-    _ -> defaultInt $ T.unpack def-  where-    def = fd ^. defaultValue-    errorMessage fieldType-        = error $ "Bad default value " ++ show (T.unpack def)-                    ++ " in default value for " ++ fieldType ++ " field "-                    ++ unpack (fd ^. name)-    -- float/double fields can use nan, inf and -inf as default values.-    -- The Prelude doesn't provide names for them, so we implement-    -- them as division by zero.-    defaultFrac "nan" = "Prelude./" @@ litFrac 0 @@ litFrac 0-    defaultFrac "inf" = "Prelude./" @@ litFrac 1 @@ litFrac 0-    defaultFrac "-inf" = "Prelude./" @@ litFrac (negate 1) @@ litFrac 0-    defaultFrac s = case reads s of-        [(x, "")] -> litFrac $ toRational (x :: Double)-        _ -> errorMessage "fractional"-    defaultInt s = case reads s of-        [(x, "")] -> litInt x-        _ -> errorMessage "integral"---- | A lens to access an internal field.------   lens _Foo_bar (\x__ y__ -> x__ { _Foo_bar = y__ })-rawFieldAccessor :: QName -> Exp-rawFieldAccessor f = "Lens.Family2.Unchecked.lens" @@ getter @@ setter-  where-    getter = Var f-    setter = Lambda noLoc ["x__", "y__"]-                    $ RecUpdate "x__" [FieldUpdate f "y__"]--descriptorExpr :: SyntaxType -> Env QName -> MessageInfo Name -> Exp-descriptorExpr syntaxType env m-    -- let foo__field_descriptor = ...-    --     ...-    -- in Message.MessageDescriptor-    --      (Data.Map.fromList [(Tag 1, foo__field_descriptor),...])-    --      (Data.Map.fromList [("foo", foo__field_descriptor),...])-    ---    -- (Note that the two maps have the same elements but different keys.  We-    -- use the "let" expression to share elements between the two maps.)-    = Let (BDecls $ map fieldDescriptorVarBind $ messageFields m)-        $ "Data.ProtoLens.MessageDescriptor"-          @@ ("Data.Map.fromList" @@ List fieldsByTag)-          @@ ("Data.Map.fromList" @@ List fieldsByTextFormatName)-  where-    fieldsByTag =-        [Tuple Boxed-              [ t, fieldDescriptorVar f ]-              | f <- messageFields m-              , let t = "Data.ProtoLens.Tag"-                          @@ litInt (fromIntegral-                                      $ fieldDescriptor f ^. number)-              ]-    fieldsByTextFormatName =-        [Tuple Boxed-              [ t, fieldDescriptorVar f ]-              | f <- messageFields m-              , let t = Lit $ Syntax.String $ T.unpack-                            $ textFormatFieldName env (fieldDescriptor f)-              ]-    fieldDescriptorVar = fromString . fieldDescriptorName-    fieldDescriptorName f-        = fromString $ overloadedField f ++ "__field_descriptor"-    fieldDescriptorVarBind f-        = FunBind-              [match (fromString $ fieldDescriptorName f) []-                  $ fieldDescriptorExpr syntaxType env f-              ]---- | Get the name of the field when used in a text format proto. Groups are--- special because their text format field name is the name of their type,--- not the name of the field in the descriptor (e.g. "Foo", not "foo").-textFormatFieldName :: Env QName -> FieldDescriptorProto -> T.Text-textFormatFieldName env descr = case descr ^. type' of-    FieldDescriptorProto'TYPE_GROUP-        | Message msg <- definedFieldType descr env-              -> messageDescriptor msg ^. name-        | otherwise -> error $ "expected TYPE_GROUP for type name"-                           ++ T.unpack (descr ^. typeName)-    _ -> descr ^. name--fieldDescriptorExpr :: SyntaxType -> Env QName -> FieldInfo-                    -> Exp-fieldDescriptorExpr syntaxType env f-    = "Data.ProtoLens.FieldDescriptor"-        -- Record the original .proto name for text format-        @@ Lit (Syntax.String (T.unpack $ fd ^. name))-        -- Force the type signature since it can't be inferred for Map entry-        -- types.-        @@ ExpTypeSig noLoc (fieldTypeDescriptorExpr (fd ^. type'))-                      ("Data.ProtoLens.FieldTypeDescriptor"-                          @@ hsFieldType env fd)-        @@ fieldAccessorExpr syntaxType env f-  where-    fd = fieldDescriptor f--fieldAccessorExpr :: SyntaxType -> Env QName -> FieldInfo -> Exp--- (PlainField Required foo), (OptionalField foo), etc...-fieldAccessorExpr syntaxType env f = accessorCon @@ Var (UnQual hsFieldName)-  where-    fd = fieldDescriptor f-    accessorCon = case fd ^. label of-          FieldDescriptorProto'LABEL_REQUIRED-              -> "Data.ProtoLens.PlainField" @@ "Data.ProtoLens.Required"-          FieldDescriptorProto'LABEL_OPTIONAL-              | isDefaultingOptional syntaxType fd-                  -> "Data.ProtoLens.PlainField" @@ "Data.ProtoLens.Optional"-              | otherwise -> "Data.ProtoLens.OptionalField"-          FieldDescriptorProto'LABEL_REPEATED-              | Just (k, v) <- getMapFields env fd-                  -> "Data.ProtoLens.MapField"-                         @@ fromString (overloadedField k)-                         @@ fromString (overloadedField v)-              | otherwise -> "Data.ProtoLens.RepeatedField"-                  @@ if fd ^. options.packed-                        then "Data.ProtoLens.Packed"-                        else "Data.ProtoLens.Unpacked"-    hsFieldName-        = Ident $ case fd ^. label of-              FieldDescriptorProto'LABEL_OPTIONAL-                  | not (isDefaultingOptional syntaxType fd)-                      -> "maybe'" ++ overloadedField f-              _ -> overloadedField f--isDefaultingOptional :: SyntaxType -> FieldDescriptorProto -> Bool-isDefaultingOptional syntaxType f-    = f ^. label == FieldDescriptorProto'LABEL_OPTIONAL-          && syntaxType == Proto3-          && f ^. type' /= FieldDescriptorProto'TYPE_MESSAGE-          -- For now, we treat oneof's like proto2 optional fields.-          && isNothing (f ^. maybe'oneofIndex)--fieldTypeDescriptorExpr :: FieldDescriptorProto'Type -> Exp-fieldTypeDescriptorExpr =-    (\n -> fromString $ "Data.ProtoLens." ++ n ++ "Field") . \t -> case t of-    FieldDescriptorProto'TYPE_DOUBLE -> "Double"-    FieldDescriptorProto'TYPE_FLOAT -> "Float"-    FieldDescriptorProto'TYPE_INT64 -> "Int64"-    FieldDescriptorProto'TYPE_UINT64 -> "UInt64"-    FieldDescriptorProto'TYPE_INT32 -> "Int32"-    FieldDescriptorProto'TYPE_FIXED64 -> "Fixed64"-    FieldDescriptorProto'TYPE_FIXED32 -> "Fixed32"-    FieldDescriptorProto'TYPE_BOOL -> "Bool"-    FieldDescriptorProto'TYPE_STRING -> "String"-    FieldDescriptorProto'TYPE_GROUP -> "Group"-    FieldDescriptorProto'TYPE_MESSAGE -> "Message"-    FieldDescriptorProto'TYPE_BYTES -> "Bytes"-    FieldDescriptorProto'TYPE_UINT32 -> "UInt32"-    FieldDescriptorProto'TYPE_ENUM -> "Enum"-    FieldDescriptorProto'TYPE_SFIXED32 -> "SFixed32"-    FieldDescriptorProto'TYPE_SFIXED64 -> "SFixed64"-    FieldDescriptorProto'TYPE_SINT32 -> "SInt32"-    FieldDescriptorProto'TYPE_SINT64 -> "SInt64"
src/protoc-gen-haskell.hs view
@@ -18,7 +18,7 @@ import Data.Text (Text, pack) import Data.ProtoLens (decodeMessage, def, encodeMessage) import Language.Haskell.Exts.Pretty (prettyPrint)-import Language.Haskell.Exts.Syntax (ModuleName(..))+import Language.Haskell.Exts.Syntax (ModuleName(..), Name(..), QName(..)) import Lens.Family2 import Bootstrap.Proto.Google.Protobuf.Compiler.Plugin     ( CodeGeneratorRequest@@ -37,8 +37,9 @@ import System.FilePath (dropExtension, replaceExtension, splitDirectories)  -import Definitions-import Generate+import Data.ProtoLens.Compiler.Definitions+import Data.ProtoLens.Compiler.Generate+import Data.ProtoLens.Compiler.Plugin  main = do     contents <- B.getContents@@ -61,82 +62,27 @@                      | (outputName, outputContent) <- outputFiles                      ] --- | The filename of an input .proto file.-type ProtoFileName = Text  generateFiles :: Text -> (FileDescriptorProto -> Text) -> [FileDescriptorProto]               -> [ProtoFileName] -> [(Text, Text)] generateFiles modulePrefix header files toGenerate = let-  filesByName = Map.fromList [(f ^. name, f) | f <- files]-  moduleNames = fmap (moduleName modulePrefix) filesByName-  -- The definitions in each input proto file, indexed by filename.-  definitions = fmap collectDefinitions filesByName-  -- The exports from each .proto file (including any "public import"-  -- dependencies), as they appear to other modules that are importing them;-  -- i.e., qualified by module name.-  exports = transitiveExports files-  localExports = Map.intersectionWith qualifyEnv moduleNames definitions-  exportedEnvs = fmap (\es -> unions [localExports ! e | e <- es]) exports+  filesByName = analyzeProtoFiles modulePrefix files   -- The contents of the generated Haskell file for a given .proto file.-  buildFile fileName = let-      f = filesByName ! fileName-      deps = f ^. dependency-      env = unions $ fmap (exportedEnvs !) deps+  buildFile file = let+      deps = descriptor file ^. dependency       imports = Set.toAscList $ Set.fromList-                  [ moduleNames ! exportName+                  [ haskellModule (filesByName ! exportName)                   | dep <- deps-                  , exportName <- exports ! dep+                  , exportName <- exports (filesByName ! dep)                   ]-      in generateModule (moduleNames ! fileName) imports (fileSyntaxType f)-              (definitions ! fileName) env-  in [ ( outputFilePath (moduleNames ! f)-       , header fd <> pack (prettyPrint $ buildFile f)+      in generateModule (haskellModule file) imports+             (fileSyntaxType (descriptor file))+             (definitions file)+             (collectEnvFromDeps deps filesByName)+  in [ ( outputFilePath . (\(ModuleName n) -> n) . haskellModule $ file+       , header (descriptor file) <> pack (prettyPrint $ buildFile file)        )-     | f <- toGenerate-     , let fd = filesByName ! f+     | fileName <- toGenerate+     , let file = filesByName ! fileName      ]---- | Given a list of .proto files (topologically sorted), determine which--- files' definitions are exported by which files.------ Files only export their own definitions, along with the definitions exported--- by any "import public" declarations.-transitiveExports :: [FileDescriptorProto] -> Map ProtoFileName [ProtoFileName]--- Accumulate the transitive dependencies by folding over the files in--- topological order.-transitiveExports = foldl' setExportsFromFile Map.empty-  where-    setExportsFromFile :: Map ProtoFileName [ProtoFileName]-                       -> FileDescriptorProto-                       -> Map ProtoFileName [ProtoFileName]-    setExportsFromFile prevExports fd-        = flip (Map.insert n) prevExports $-            n : concat [ prevExports ! ((fd ^. dependency) !! fromIntegral i)-                       -- Note that publicDependency is a list of indices into-                       -- the dependency list.-                       | i <- fd ^. publicDependency-                       ]-      where n = fd ^. name--outputFilePath :: ModuleName -> Text-outputFilePath (ModuleName n) = T.replace "." "/" (T.pack n) <> ".hs"---- | Get the module name of a .proto file.-moduleName :: Text -> FileDescriptorProto -> ModuleName-moduleName modulePrefix fd = ModuleName $ fixModuleName rawModuleName-  where-    path = fd ^. name-    prefix-        | T.null modulePrefix = "Proto"-        | otherwise = modulePrefix-    fixModuleName "" = ""-    -- Characters allowed in Bazel filenames but not in module names:-    fixModuleName ('.':c:cs) = '.' : toUpper c : fixModuleName cs-    fixModuleName ('_':c:cs) = toUpper c : fixModuleName cs-    fixModuleName ('-':c:cs) = toUpper c : fixModuleName cs-    fixModuleName (c:cs) = c : fixModuleName cs-    rawModuleName = intercalate "." $ (T.unpack prefix :)-                        $ splitDirectories $ dropExtension-                        $ T.unpack path-