Make reflected definitions easy to access
Given a reflected function like this:
let foo (x) = ...
I would like to be able to get the reflected definition like this:
instead of ugly code like this (note how I had to write the method name as a string):
let fooType = foo.GetType().DeclaringType.GetMethod("foo")
let fooExpr = Expr.TryGetReflectedDefinition(fooType)
See comment from Don Syme
Don Syme commented
Using a quotation <@ foo @> will make it easier to accurately get the method name.
I will decline this: the existing mechanism seems good enough considering this is relatively rare.