MakeReflections module takes the
Resolve and produces a
Reflections. This also takes a Haskell module prefix and the
proto's package namespace as input. The output is suitable
for passing to the
Gen module to produce the files.
This acheives several things: It moves the data from a nested tree to flat lists and maps. It moves the group information from the parent Descriptor to the actual Descriptor. It moves the data out of Maybe types. It converts Utf8 to String. Keys known to extend a Descriptor are listed in that Descriptor.
In building the reflection info new things are computed. It changes
dotted names to ProtoName using the translator from
makeNameMaps. It parses the default value from the ByteString to
a Haskell type. For fields, the value of the tag on the wire is
computed and so is its size on the wire.