Is there a way to achieve this:
module Pimp =
let inline operationId (operationData: 'a when 'a: (member OperationId: Guid<OperationId>)) operationId =
{ operationData with OperationId = operationId }
The above code does not compile:
The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... }
There is no type constraint for ' record'. Can I tell the compiler to treat it as a record otherwise?
Or do I have to use Reflection?