Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
rSingleton :: DiscreteOrdered v => v -> RSet vRanged-sets Data.Ranged.RangedSet Create a Ranged Set from a single element.
prop_emptyNonSingleton :: BoolRanged-sets Data.Ranged.Ranges The empty range is not a singleton.
prop_emptyNonSingleton = rangeSingletonValue emptyRange == Nothing
-
Ranged-sets Data.Ranged.Ranges The full range is not a singleton.
prop_fullNonSingleton = rangeSingletonValue fullRange == Nothing
prop_intSingleton :: Integer -> Integer -> PropertyRanged-sets Data.Ranged.Ranges For all integers x and y, any range formed from boundaries on either side of x and y is a singleton iff it contains exactly one integer.
prop_nonSingleton :: Double -> Double -> PropertyRanged-sets Data.Ranged.Ranges For real x and y, x < y implies that any range between them is a non-singleton.
prop_singletonRangeConverse :: DiscreteOrdered a => a -> BoolRanged-sets Data.Ranged.Ranges A singleton range can have its value extracted.
prop_singletonRangeConverse v = rangeSingletonValue (singletonRange v) == Just v
prop_singletonRangeHas :: DiscreteOrdered a => a -> BoolRanged-sets Data.Ranged.Ranges Range Singleton has its member.
prop_singletonRangeHas v = singletonRange v `rangeHas` v
prop_singletonRangeHasOnly :: DiscreteOrdered a => a -> a -> BoolRanged-sets Data.Ranged.Ranges Range Singleton has only its member.
prop_singletonHasOnly v1 v2 = (v1 == v2) == (singletonRange v1 `rangeHas` v2)
rangeSingletonValue :: DiscreteOrdered v => Range v -> Maybe vRanged-sets Data.Ranged.Ranges If the range is a singleton, returns Just the value. Otherwise returns Nothing. Known bug: This always returns Nothing for ranges including BoundaryBelowAll or BoundaryAboveAll. For bounded types this can be incorrect. For instance, the following range only contains one value:
Range (BoundaryBelow maxBound) BoundaryAboveAll
-
generics-sop-lens Generics.SOP.Lens No documentation available.