From 0894d552c6298be546fab9ddb9e801b147f7083f Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 12 Jan 2021 17:50:24 -0800 Subject: [PATCH 1/2] Remove deprecated unsafeCompare --- src/Data/Ord/Unsafe.js | 13 ------------- src/Data/Ord/Unsafe.purs | 19 ------------------- 2 files changed, 32 deletions(-) delete mode 100644 src/Data/Ord/Unsafe.js delete mode 100644 src/Data/Ord/Unsafe.purs 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 From f03f960f7c93e8fd9fa1faa98cf9f3ffd3c0943a Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Wed, 13 Jan 2021 12:39:04 -0800 Subject: [PATCH 2/2] Update changelog to include this PR --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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)