Skip to content

Commit

Permalink
[RangeSetOld] Remove inline (causes FS1118 warning)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyazinthh committed Jun 6, 2024
1 parent 8b83d08 commit c3ba9cd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ type private HalfRange =

override x.Equals o =
match o with
| :? HalfRange as o ->
| :? HalfRange as o ->
x.IsMax = o.IsMax && x.Value = o.Value
| _ ->
false

member x.CompareTo (o : HalfRange) =
let c = x.Value.CompareTo o.Value
if c = 0 then
if c = 0 then
if x.IsMax = o.IsMax then 0
else (if x.IsMax then 1 else -1)
else
Expand All @@ -45,7 +45,7 @@ type private HalfRange =
[<Obsolete("Use RangeSet1i instead. Note that upper bounds returned by Max and Range are now inclusive.")>]
[<StructuredFormatDisplay("{AsString}")>]
type RangeSet = private { root : FingerTreeNode<HalfRange, HalfRange> } with

member private x.AsString =
x |> Seq.map (sprintf "%A")
|> String.concat "; "
Expand Down Expand Up @@ -74,7 +74,7 @@ type RangeSet = private { root : FingerTreeNode<HalfRange, HalfRange> } with


and private RangeSetEnumerator(i : IEnumerator<HalfRange>) =

let mutable last = HalfRange()
let mutable current = HalfRange()

Expand Down Expand Up @@ -113,8 +113,8 @@ module RangeSet =

let private minRange = HalfRange(false, Int32.MinValue)

let inline private leq v = HalfRange(true, v)
let inline private geq v = HalfRange(false, v)
let private leq v = HalfRange(true, v)
let private geq v = HalfRange(false, v)

let inline private (|Leq|Geq|) (r : HalfRange) =
if r.IsMax then Leq r.Value
Expand All @@ -132,7 +132,7 @@ module RangeSet =
let min = geq range.Min

match FingerTreeNode.lastOpt l, FingerTreeNode.firstOpt r with
| None, None ->
| None, None ->
{ root = Deep(max, One(min), Empty, One(max)) }

| Some lmax, None ->
Expand Down Expand Up @@ -169,7 +169,7 @@ module RangeSet =
let min = leq range.Min

match FingerTreeNode.lastOpt l, FingerTreeNode.firstOpt r with
| None, None ->
| None, None ->
{ root = Empty }

| Some lmax, None ->
Expand Down Expand Up @@ -244,14 +244,14 @@ type private HalfRange64 =

override x.Equals o =
match o with
| :? HalfRange64 as o ->
| :? HalfRange64 as o ->
x.IsMax = o.IsMax && x.Value = o.Value
| _ ->
false

member x.CompareTo (o : HalfRange64) =
let c = x.Value.CompareTo o.Value
if c = 0 then
if c = 0 then
if x.IsMax = o.IsMax then 0
else (if x.IsMax then 1 else -1)
else
Expand All @@ -268,7 +268,7 @@ type private HalfRange64 =
[<Obsolete("Use RangeSet1l instead. Note that upper bounds returned by Max and Range are now inclusive.")>]
[<StructuredFormatDisplay("{AsString}")>]
type RangeSet64 = private { root : FingerTreeNode<HalfRange64, HalfRange64> } with

member private x.AsString =
x |> Seq.map (sprintf "%A")
|> String.concat "; "
Expand Down Expand Up @@ -297,7 +297,7 @@ type RangeSet64 = private { root : FingerTreeNode<HalfRange64, HalfRange64> } wi


and private RangeSet64Enumerator(i : IEnumerator<HalfRange64>) =

let mutable last = HalfRange64()
let mutable current = HalfRange64()

Expand Down Expand Up @@ -336,8 +336,8 @@ module RangeSet64 =

let private minRange = HalfRange64(false, Int64.MinValue)

let inline private leq v = HalfRange64(true, v)
let inline private geq v = HalfRange64(false, v)
let private leq v = HalfRange64(true, v)
let private geq v = HalfRange64(false, v)

let inline private (|Leq|Geq|) (r : HalfRange64) =
if r.IsMax then Leq r.Value
Expand All @@ -355,7 +355,7 @@ module RangeSet64 =
let min = geq range.Min

match FingerTreeNode.lastOpt l, FingerTreeNode.firstOpt r with
| None, None ->
| None, None ->
{ root = Deep(max, One(min), Empty, One(max)) }

| Some lmax, None ->
Expand Down Expand Up @@ -392,7 +392,7 @@ module RangeSet64 =
let min = leq range.Min

match FingerTreeNode.lastOpt l, FingerTreeNode.firstOpt r with
| None, None ->
| None, None ->
{ root = Empty }

| Some lmax, None ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ type private __halfrange__ =

override x.Equals o =
match o with
| :? __halfrange__ as o ->
| :? __halfrange__ as o ->
x.IsMax = o.IsMax && x.Value = o.Value
| _ ->
false

member x.CompareTo (o : __halfrange__) =
let c = x.Value.CompareTo o.Value
if c = 0 then
if c = 0 then
if x.IsMax = o.IsMax then 0
else (if x.IsMax then 1 else -1)
else
Expand All @@ -54,7 +54,7 @@ type private __halfrange__ =
[<Obsolete("Use __replacement__ instead. Note that upper bounds returned by Max and Range are now inclusive.")>]
[<StructuredFormatDisplay("{AsString}")>]
type __rangeset__ = private { root : FingerTreeNode<__halfrange__, __halfrange__> } with

member private x.AsString =
x |> Seq.map (sprintf "%A")
|> String.concat "; "
Expand Down Expand Up @@ -83,7 +83,7 @@ type __rangeset__ = private { root : FingerTreeNode<__halfrange__, __halfrange__


and private __rangesetenumerator__(i : IEnumerator<__halfrange__>) =

let mutable last = __halfrange__()
let mutable current = __halfrange__()

Expand Down Expand Up @@ -122,8 +122,8 @@ module __rangeset__ =

let private minRange = __halfrange__(false, __systype__.MinValue)

let inline private leq v = __halfrange__(true, v)
let inline private geq v = __halfrange__(false, v)
let private leq v = __halfrange__(true, v)
let private geq v = __halfrange__(false, v)

let inline private (|Leq|Geq|) (r : __halfrange__) =
if r.IsMax then Leq r.Value
Expand All @@ -141,7 +141,7 @@ module __rangeset__ =
let min = geq range.Min

match FingerTreeNode.lastOpt l, FingerTreeNode.firstOpt r with
| None, None ->
| None, None ->
{ root = Deep(max, One(min), Empty, One(max)) }

| Some lmax, None ->
Expand Down Expand Up @@ -178,7 +178,7 @@ module __rangeset__ =
let min = leq range.Min

match FingerTreeNode.lastOpt l, FingerTreeNode.firstOpt r with
| None, None ->
| None, None ->
{ root = Empty }

| Some lmax, None ->
Expand Down

0 comments on commit c3ba9cd

Please sign in to comment.