Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate enums in a F# Type Provider

This changeset to the F# 3.0 sample pack seems to suggest it's possible, but there is no ProvidedEnum in ProvidedTypes.fs

like image 445
Gustavo Guerra Avatar asked Oct 22 '22 16:10

Gustavo Guerra


1 Answers

Use ProvidedTypeDefinition and just use a real enum type as the base type. This feature isn't especially well tested, so ask follow-up questions if you run into problems.

like image 64
kvb Avatar answered Oct 25 '22 21:10

kvb