In F# enums can be create using the following syntax (note you must explicitly give the members a value to distinguish it from a union type):
[<System.Flags>]
type RuleTarget =
| Class = 0x0001
| Delegate = 0x0002
| Enum = 0x0004
| Struct = 0x0008
It's seems for the moment you can't reference enum members from there definition so you can't create a value "AllTypes" as a member (unless you work out its value). As a work around you can create a sperate value for all types:
let AllTypes = RuleTarget.Class ||| RuleTarget.Delegate ||| RuleTarget.Enum ||| RuleTarget.Struct
If this is really important to you send a feature request to the F# team, they've generally been quite good about small feature requests like this.
Robert Pickering
http://strangelights.com