diff options
author | Eduardo Julian | 2015-07-12 21:04:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-07-12 21:04:56 -0400 |
commit | 658ff3e1e7d90ce72c8a02ef4cf7e177d8ac6f86 (patch) | |
tree | 4ee6b9c0727a7619b1ebb2a50c9db17ada6a35c0 /input/lux/data/bounded.lux | |
parent | e351122010b5eb5bf8793382a4a4ddcf5fb3a386 (diff) |
- Added the beginnings of the standard library.
- Fixed several bugs.
Diffstat (limited to 'input/lux/data/bounded.lux')
-rw-r--r-- | input/lux/data/bounded.lux | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/input/lux/data/bounded.lux b/input/lux/data/bounded.lux new file mode 100644 index 000000000..14f4d2e86 --- /dev/null +++ b/input/lux/data/bounded.lux @@ -0,0 +1,26 @@ +## Copyright (c) Eduardo Julian. All rights reserved. +## The use and distribution terms for this software are covered by the +## Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +## which can be found in the file epl-v10.html at the root of this distribution. +## By using this software in any fashion, you are agreeing to be bound by +## the terms of this license. +## You must not remove this notice, or any other, from this software. + +(;import lux) + +## Signatures +(defsig #export (Bounded a) + (: a + top) + + (: a + bottom)) + +## Structure +(do-template [<name> <type> <top> <bottom>] + [(defstruct #export <name> (Bounded <type>) + (def top <top>) + (def bottom <bottom>))] + + [Int:Bounded Int (_jvm_getstatic java.lang.Long MAX_VALUE) (_jvm_getstatic java.lang.Long MIN_VALUE)] + [Real:Bounded Real (_jvm_getstatic java.lang.Double MAX_VALUE) (_jvm_getstatic java.lang.Double MIN_VALUE)]) |