pub mod FSharp {
    use super::*;
    pub mod Core {
        use super::*;
        pub mod LanguagePrimitives {
            use super::*;
            use crate::FSharp::Collections::ComparisonIdentity::Structural as Structural_1;
            use crate::FSharp::Collections::HashIdentity::Structural;
            use crate::Native_::LrcPtr;
            use crate::System::Collections::Generic::IComparer_1;
            use crate::System::Collections::Generic::IEqualityComparer_1;
            pub fn GenericEqualityComparer<T: core::hash::Hash + PartialEq + Clone + 'static>()
            -> LrcPtr<dyn IEqualityComparer_1<T>> {
                Structural::<T>()
            }
            pub fn GenericEqualityERComparer<T: core::hash::Hash + PartialEq + Clone + 'static>()
            -> LrcPtr<dyn IEqualityComparer_1<T>> {
                Structural::<T>()
            }
            pub fn FastGenericComparer<T: PartialOrd + Clone + 'static>()
            -> LrcPtr<dyn IComparer_1<T>> {
                Structural_1::<T>()
            }
            pub fn FastGenericComparerFromTable<T: PartialOrd + Clone + 'static>()
            -> LrcPtr<dyn IComparer_1<T>> {
                Structural_1::<T>()
            }
            pub fn FastGenericEqualityComparer<
                T: core::hash::Hash + PartialEq + Clone + 'static,
            >() -> LrcPtr<dyn IEqualityComparer_1<T>> {
                Structural::<T>()
            }
            pub fn FastGenericEqualityComparerFromTable<
                T: core::hash::Hash + PartialEq + Clone + 'static,
            >() -> LrcPtr<dyn IEqualityComparer_1<T>> {
                Structural::<T>()
            }
        }
        pub mod Operators {
            use super::*;
            use crate::Choice_::Choice_2;
            use crate::Exception_::finally;
            use crate::Native_::Func0;
            use crate::Native_::Func1;
            use crate::Native_::LrcPtr;
            use crate::Native_::Nullable;
            use crate::Native_::NullableRef;
            use crate::Native_::is_null;
            use crate::Option_::getValue;
            use crate::String_::string;
            use crate::System::ArgumentNullException;
            use crate::System::Exception as Exception_1;
            use crate::System::Exception;
            use crate::System::IDisposable;
            use crate::System::NullReferenceException;
            pub fn Failure(message: string) -> LrcPtr<Exception> {
                Exception_1::_ctor__Z721C83C5(message)
            }
            pub fn FailurePattern(exn: LrcPtr<Exception>) -> Option<string> {
                Some(exn.get_Message())
            }
            pub fn NullArg<_a: Clone + 'static>(argumentName: string) -> _a {
                panic!(
                    "{}",
                    ArgumentNullException::_ctor__Z721C83C5(argumentName).get_Message(),
                )
            }
            pub fn Using<T: IDisposable + NullableRef + Clone + 'static, R: Clone + 'static>(
                resource: T,
                action: Func1<T, R>,
            ) -> R {
                let __finally__ = finally(Func0::new({
                    let resource = resource.clone();
                    move || {
                        if is_null(&resource) {
                            ()
                        } else {
                            resource.Dispose()
                        }
                    }
                }));
                action(resource.clone())
            }
            pub fn Lock<_a: Clone + 'static, _b: Clone + 'static>(
                _lockObj: _a,
                action: Func0<_b>,
            ) -> _b {
                action()
            }
            pub fn IsNull<T: NullableRef + Clone + 'static>(value: T) -> bool {
                if is_null(&value) { true } else { false }
            }
            pub fn IsNotNull<T: NullableRef + Clone + 'static>(value: T) -> bool {
                if is_null(&value) { false } else { true }
            }
            pub fn IsNullV<T: Clone + 'static>(value: Nullable<T>) -> bool {
                !value.is_some()
            }
            pub fn NonNull<T: NullableRef + Clone + 'static>(value: T) -> T {
                if is_null(&value) {
                    panic!("{}", NullReferenceException::_ctor().get_Message(),)
                } else {
                    value
                }
            }
            pub fn NonNullV<T: Clone + 'static>(value: Nullable<T>) -> T {
                if value.is_some() {
                    getValue(value)
                } else {
                    panic!("{}", NullReferenceException::_ctor().get_Message(),)
                }
            }
            pub fn NullMatchPattern<T: NullableRef + Clone + 'static>(
                value: T,
            ) -> LrcPtr<Choice_2<(), T>> {
                if is_null(&value) {
                    LrcPtr::new(Choice_2::Choice1Of2::<(), T>(()))
                } else {
                    LrcPtr::new(Choice_2::Choice2Of2::<(), T>(value))
                }
            }
            pub fn NullValueMatchPattern<T: Clone + 'static>(
                value: Nullable<T>,
            ) -> LrcPtr<Choice_2<(), T>> {
                if value.is_some() {
                    LrcPtr::new(Choice_2::Choice2Of2::<(), T>(getValue(value)))
                } else {
                    LrcPtr::new(Choice_2::Choice1Of2::<(), T>(()))
                }
            }
            pub fn NonNullQuickPattern<T: NullableRef + Clone + 'static>(value: T) -> T {
                if is_null(&value) {
                    panic!("{}", NullReferenceException::_ctor().get_Message(),)
                } else {
                    value
                }
            }
            pub fn NonNullQuickValuePattern<T: Clone + 'static>(value: Nullable<T>) -> T {
                if value.is_some() {
                    getValue(value)
                } else {
                    panic!("{}", NullReferenceException::_ctor().get_Message(),)
                }
            }
            pub fn WithNull<T: NullableRef + Clone + 'static>(value: T) -> T {
                value
            }
            pub fn WithNullV<T: Clone + 'static>(value: T) -> Option<T> {
                Some(value)
            }
            pub fn NullV<T: Clone + 'static>() -> Option<T> {
                None::<T>
            }
            pub fn NullArgCheck<T: NullableRef + Clone + 'static>(
                argumentName: string,
                value: T,
            ) -> T {
                if is_null(&value) {
                    panic!(
                        "{}",
                        ArgumentNullException::_ctor__Z721C83C5(argumentName).get_Message(),
                    )
                } else {
                    value
                }
            }
        }
        pub mod ExtraTopLevelOperators {
            use super::*;
            use crate::Native_::LrcPtr;
            use crate::System::Lazy_1;
            pub fn LazyPattern<_a: Clone + 'static>(input: LrcPtr<Lazy_1<_a>>) -> _a {
                input.Force()
            }
        }
    }
}
