From 898f35ae53ccbf2f9d2dd609754513e0b6ddb776 Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Wed, 13 Jan 2021 12:41:11 -0800 Subject: [PATCH] Remove deprecated 'unsafeCompare' (#257) * Remove deprecated unsafeCompare * Update changelog to include this PR --- CHANGELOG.md | 1 + src/Data/Ord/Unsafe.js | 13 ------------- src/Data/Ord/Unsafe.purs | 19 ------------------- 3 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 src/Data/Ord/Unsafe.js delete mode 100644 src/Data/Ord/Unsafe.purs diff --git a/CHANGELOG.md b/CHANGELOG.md index 865bcb40..d7888e1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Breaking changes: - `purescript-generics-rep` was ported to this repo (#235) - Move the `Applicative` Superclass law from `Monad` to `Bind` and rename it to the `Apply` Superclass law (#229) +- Removed `unsafeCompare` (#257) New features: - Added `Bounded` instance for records (#208) diff --git a/src/Data/Ord/Unsafe.js b/src/Data/Ord/Unsafe.js deleted file mode 100644 index 906e9cdc..00000000 --- a/src/Data/Ord/Unsafe.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -exports.unsafeCompareImpl = function (lt) { - return function (eq) { - return function (gt) { - return function (x) { - return function (y) { - return x < y ? lt : x === y ? eq : gt; - }; - }; - }; - }; -}; diff --git a/src/Data/Ord/Unsafe.purs b/src/Data/Ord/Unsafe.purs deleted file mode 100644 index a47a4c3b..00000000 --- a/src/Data/Ord/Unsafe.purs +++ /dev/null @@ -1,19 +0,0 @@ -module Data.Ord.Unsafe (unsafeCompare) where - -import Prim.TypeError (class Warn, Text) -import Data.Ordering (Ordering(..)) - -unsafeCompare - :: forall a. - Warn (Text "'unsafeCompare' is deprecated.") - => a -> a -> Ordering -unsafeCompare = unsafeCompareImpl LT EQ GT - -foreign import unsafeCompareImpl - :: forall a - . Ordering - -> Ordering - -> Ordering - -> a - -> a - -> Ordering