@@ -3357,14 +3357,15 @@ module internal HashMapImplementation =
33573357
33583358
33593359
3360- [<Struct; CustomEquality; NoComparison; StructuredFormatDisplay( " {AsString}" ) >]
3360+ [<Struct; CustomEquality; NoComparison; StructuredFormatDisplay( " {AsString}" ); CompiledName ( " FSharpHashSet`1 " ) >]
33613361type HashSet < 'T > internal ( cmp : IEqualityComparer < 'T >, root : HashSetNode < 'T >) =
33623362
33633363 static member Empty = HashSet< 'T>( DefaultEqualityComparer< 'T>. Instance, HashSetEmpty.Instance)
33643364
33653365 member x.Count = root.Count
33663366 member x.IsEmpty = root.IsEmpty
33673367
3368+ member internal x.Comparer = cmp
33683369 member internal x.Root = root
33693370
33703371 member private x.AsString = x.ToString()
@@ -3584,6 +3585,18 @@ type HashSet<'T> internal(cmp: IEqualityComparer<'T>, root: HashSetNode<'T>) =
35843585 interface System.Collections.Generic.IEnumerable< 'T> with
35853586 member x.GetEnumerator () = new HashSetEnumerator<_>( root) :> _
35863587
3588+ new ( elements : seq< 'T>) =
3589+ let o = HashSet.OfSeq elements
3590+ HashSet< 'T>( o.Comparer, o.Root)
3591+
3592+ new ( elements : HashSet< 'T>) =
3593+ HashSet< 'T>( elements.Comparer, elements.Root)
3594+
3595+ new ( elements : 'T[]) =
3596+ let o = HashSet.OfArray elements
3597+ HashSet< 'T>( o.Comparer, o.Root)
3598+
3599+
35873600and internal HashSetEnumerator < 'T >( root : HashSetNode < 'T >) =
35883601 let mutable stack = [ root]
35893602 let mutable linked : HashSetLinked < 'T > = null
@@ -3636,14 +3649,15 @@ and internal HashSetEnumerator<'T>(root: HashSetNode<'T>) =
36363649 member x.Current = x.Current
36373650
36383651
3639- [<Struct; CustomEquality; NoComparison; StructuredFormatDisplay( " {AsString}" ) >]
3652+ [<Struct; CustomEquality; NoComparison; StructuredFormatDisplay( " {AsString}" ); CompiledName ( " FSharpHashMap`2 " ) >]
36403653type HashMap < 'K , [< EqualityConditionalOn >] 'V > internal ( cmp : IEqualityComparer < 'K >, root : HashMapNode < 'K , 'V >) =
36413654
36423655 static member Empty = HashMap< 'K, 'V>( DefaultEqualityComparer< 'K>. Instance, HashMapEmpty.Instance)
36433656
36443657 member x.Count = root.Count
36453658 member x.IsEmpty = root.IsEmpty
36463659
3660+ member internal x.Comparer = cmp
36473661 member internal x.Root : HashMapNode < 'K , 'V > = root
36483662
36493663 member x.Item
@@ -3939,6 +3953,29 @@ type HashMap<'K, [<EqualityConditionalOn>] 'V> internal(cmp: IEqualityComparer<'
39393953
39403954 interface System.Collections.Generic.IEnumerable< 'K * 'V> with
39413955 member x.GetEnumerator () = new HashMapEnumerator<_,_>( root) :> _
3956+
3957+
3958+
3959+ new ( elements : seq< 'K * 'V>) =
3960+ let o = HashMap.OfSeq elements
3961+ HashMap< 'K, 'V>( o.Comparer, o.Root)
3962+
3963+ new ( elements : HashMap< 'K, 'V>) =
3964+ HashMap< 'K, 'V>( elements.Comparer, elements.Root)
3965+
3966+ new ( elements : array< 'K * 'V>) =
3967+ let o = HashMap.OfArray elements
3968+ HashMap< 'K, 'V>( o.Comparer, o.Root)
3969+
3970+ #if ! FABLE_ COMPILER
3971+ new ( elements : seq< struct ( 'K * 'V)>) =
3972+ let o = HashMap.OfSeqV elements
3973+ HashMap< 'K, 'V>( o.Comparer, o.Root)
3974+
3975+ new ( elements : array< struct ( 'K * 'V)>) =
3976+ let o = HashMap.OfArrayV elements
3977+ HashMap< 'K, 'V>( o.Comparer, o.Root)
3978+ #endif
39423979
39433980and internal HashMapEnumerator < 'K , 'V >( root : HashMapNode < 'K , 'V >) =
39443981 let mutable stack = [ root]
@@ -4042,7 +4079,9 @@ and internal HashMapStructEnumerator<'K, 'V>(root: HashMapNode<'K, 'V>) =
40424079 member x.Dispose () = x.Dispose()
40434080 member x.Current = x.Current
40444081
4082+
40454083[<CompilationRepresentation( CompilationRepresentationFlags.ModuleSuffix) >]
4084+ [<RequireQualifiedAccess>]
40464085module HashSet =
40474086
40484087 /// The empty set.
@@ -4200,6 +4239,7 @@ module HashSet =
42004239 HashSet< 'T>. ApplyDelta( l, r, apply)
42014240
42024241[<CompilationRepresentation( CompilationRepresentationFlags.ModuleSuffix) >]
4242+ [<RequireQualifiedAccess>]
42034243module HashMap =
42044244
42054245 /// The empty map.
0 commit comments