partialord 0.0.1 → 0.0.2
raw patch · 3 files changed
+8/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.PartialOrd: fromCompare :: Ord a => a -> a -> PartialOrdering
Files
- README.md +2/−1
- partialord.cabal +1/−1
- src/Data/PartialOrd.hs +5/−0
README.md view
@@ -9,6 +9,7 @@ [partial-order](https://hackage.haskell.org/package/partial-order). Differences include: * PartialOrd has a comparison valued in Maybe Ordering; we use a fresh- type.+ type with four constructors. * Where types have several natural partial orderings, we provide newtypes rather than choosing one.+* We pay slightly more attention to algorithmic complexity.
partialord.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: partialord-version: 0.0.1+version: 0.0.2 synopsis: Data structure supporting partial orders description: Please see README.md category: Data structures
src/Data/PartialOrd.hs view
@@ -12,6 +12,7 @@ toMaybeOrd, fromMaybeOrd, fromLeqGeq,+ fromCompare, -- * Partial orderings PartialOrd(..), comparable,@@ -50,6 +51,10 @@ fromOrd EQ = EQ' fromOrd LT = LT' fromOrd GT = GT'++-- | Lift a `compare` to a `compare'`+fromCompare :: Ord a => a -> a -> PartialOrdering+fromCompare x y = fromOrd $ compare x y -- | Convert a partial ordering to an ordering toMaybeOrd :: PartialOrdering -> Maybe Ordering