We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6d9c4e commit fd832daCopy full SHA for fd832da
src/Data/Ord/Unsafe.js
@@ -0,0 +1,13 @@
1
+"use strict";
2
+
3
+exports.unsafeCompareImpl = function (lt) {
4
+ return function (eq) {
5
+ return function (gt) {
6
+ return function (x) {
7
+ return function (y) {
8
+ return x < y ? lt : x === y ? eq : gt;
9
+ };
10
11
12
13
+};
src/Data/Ord/Unsafe.purs
@@ -0,0 +1,15 @@
+module Data.Ord.Unsafe (unsafeCompare) where
+import Data.Ordering (Ordering(..))
+unsafeCompare :: forall a. a -> a -> Ordering
+unsafeCompare = unsafeCompareImpl LT EQ GT
+foreign import unsafeCompareImpl
+ :: forall a
+ . Ordering
+ -> Ordering
+ -> a
14
15
0 commit comments