proto-lens library generates this code for an example protobuf service based on types defined here
data ExampleService = ExampleService {}
instance Data.ProtoLens.Service.Types.Service ExampleService where
type ServiceName ExampleService = "ExampleService"
type ServiceMethods ExampleService = '["method1", "method2"]
instance Data.ProtoLens.Service.Types.HasMethodImpl ExampleService "method1" where
type MethodName ExampleService "method1" = "Method1"
instance Data.ProtoLens.Service.Types.HasMethodImpl ExampleService "method2" where
type MethodName ExampleService "method2" = "Method2"
I want to get all methods defined on Service s like this
getMethods :: (Service s) -> s -> [String]
which for getMethods ExampleService should return ["Method1", "Method2"]
How can I implement getMethods function?