You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a generative type provider fails to create a computation expression builder with a custom operation. The compiler fails to recognise the method as a custom operation.
Note that the IL appears to be practically equivalent for the generated type and the manually created builder (that does compile successfully).
ProvidedCustomOperation/Usage/Program.fs(12,5): error FS0039: The value or constructor 'add' is not defined. [ProvidedCustomOperation/Usage/Usage.fsproj]
ProvidedCustomOperation/Usage/Program.fs(13,5): error FS0039: The value or constructor 'add' is not defined. [ProvidedCustomOperation/Usage/Usage.fsproj]
Related information
Operating system: Darwin Davids-iMac.local 20.6.0 Darwin Kernel Version 20.6.0: Tue Jun 21 20:50:28 PDT 2022; root:xnu-7195.141.32~1/RELEASE_X86_64 x86_64
Branch: NuGet 7.0.3
.NET Runtime: 6.0.301
The text was updated successfully, but these errors were encountered:
Description
Using a generative type provider fails to create a computation expression builder with a custom operation. The compiler fails to recognise the method as a custom operation.
Note that the IL appears to be practically equivalent for the generated type and the manually created builder (that does compile successfully).
Repro steps
See the repo ProvidedCustomOperation for a minimal reproduction. Key snippets below:
The generative type provider that creates a computation expression builder with a custom operation defined.
The equivalent builder:
Expected behavior
The computation expression compiles successfully:
Actual behavior
Compilation error:
Related information
The text was updated successfully, but these errors were encountered: