Skip to content

Commit d84c89f

Browse files
committed
Add deprecation warning to unsafeCompare
1 parent fd832da commit d84c89f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Data/Ord/Unsafe.purs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
module Data.Ord.Unsafe (unsafeCompare) where
22

3+
import Prim.TypeError (class Warn, Text)
34
import Data.Ordering (Ordering(..))
45

5-
unsafeCompare :: forall a. a -> a -> Ordering
6+
unsafeCompare
7+
:: forall a.
8+
Warn (Text "'unsafeCompare' is deprecated.")
9+
=> a -> a -> Ordering
610
unsafeCompare = unsafeCompareImpl LT EQ GT
711

812
foreign import unsafeCompareImpl

0 commit comments

Comments
 (0)