namespace Foo
open System
[<AutoOpen>]
module FsExtensions =
type Nullable<'T when 'T : struct and 'T :> ValueType and 'T:(new: unit -> 'T)> with
/// Converts a Nullable type into an Option.
member inline this.AsOption =
if this.HasValue then Some(this.Value) else None