aboutsummaryrefslogtreecommitdiff
path: root/source/lux/control/ord.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/lux/control/ord.lux41
1 files changed, 0 insertions, 41 deletions
diff --git a/source/lux/control/ord.lux b/source/lux/control/ord.lux
deleted file mode 100644
index cb77e7042..000000000
--- a/source/lux/control/ord.lux
+++ /dev/null
@@ -1,41 +0,0 @@
-## Copyright (c) Eduardo Julian. All rights reserved.
-## This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-## If a copy of the MPL was not distributed with this file,
-## You can obtain one at http://mozilla.org/MPL/2.0/.
-
-(;import lux
- (../eq #as E))
-
-## [Signatures]
-(defsig #export (Ord a)
- (: (E;Eq a)
- _eq)
- (do-template [<name>]
- [(: (-> a a Bool) <name>)]
-
- [<] [<=] [>] [>=]))
-
-## [Constructors]
-(def #export (ord$ eq < >)
- (All [a]
- (-> (E;Eq a) (-> a a Bool) (-> a a Bool) (Ord a)))
- (struct
- (def _eq eq)
- (def < <)
- (def (<= x y)
- (or (< x y)
- (:: eq (= x y))))
- (def > >)
- (def (>= x y)
- (or (> x y)
- (:: eq (= x y))))))
-
-## [Functions]
-(do-template [<name> <op>]
- [(def #export (<name> ord x y)
- (All [a]
- (-> (Ord a) a a a))
- (if (:: ord (<op> x y)) x y))]
-
- [max >]
- [min <])