//========================================================================== // Basic enum-related operations // // (c) Microsoft Corporation 2005-2009. //========================================================================= namespace Microsoft.FSharp.Compatibility open Microsoft.FSharp.Core open Microsoft.FSharp.Collections /// Simple operations to convert between .NET enuemration types and integers [] module Enum= /// Convert an enumeration value to an integer. The argument type is inferred from context. [] val to_int: 'T -> int when 'T :> System.Enum /// Convert an integer to an enumeration value. The result type is inferred from context. [] val of_int: int -> 'T when 'T :> System.Enum /// Combine enum values using 'logical or'. The relevant enumeration type is inferred from context. [] val combine: 'T list -> 'T when 'T :> System.Enum /// Test if an enumeration value has a particular flag set, using 'logical and'. /// The relevant enumeration type is inferred from context. [ enum 0' as a replacement")>] val test: 'T -> 'T -> bool when 'T :> System.Enum