awakesecurity / gRPC-haskell

Haskell gRPC support
https://hackage.haskell.org/package/grpc-haskell
Apache License 2.0
236 stars 74 forks source link

Derive stock instances for `MetadataMap` #139

Closed riz0id closed 1 year ago

riz0id commented 1 year ago

This PR derives the instances Ord, Data, and Typeable classes for the MetadataMap type. The Ord instance is necessary for storing MetadataMap in ordered containers such as Set. The Data and Typeable instances can also be provided for MetadataMap via the stock deriving mechanism and are useful for SYB-style programming.

Our grpc-mqtt library depends on orphans of these instances and it would be nice to have them canonicalized here.