sanctuary-int
Advanced tools
Comparing version 2.0.0 to 3.0.0
16
index.js
@@ -26,5 +26,2 @@ //. # sanctuary-int | ||
// test :: Type -> Any -> Boolean | ||
var test = $.test ([]); | ||
//# Int :: Type | ||
@@ -34,5 +31,6 @@ //. | ||
var Int = $.NullaryType | ||
('sanctuary-int/Int') | ||
('Int') | ||
('https://github.com/sanctuary-js/sanctuary-int#Int') | ||
(function(x) { return test ($.Number) (x) && (x | 0) === x; }); | ||
([$.Number]) | ||
(function(x) { return (x | 0) === x; }); | ||
@@ -44,5 +42,6 @@ //# NonZeroInt :: Type | ||
var NonZeroInt = $.NullaryType | ||
('sanctuary-int/NonZeroInt') | ||
('NonZeroInt') | ||
('https://github.com/sanctuary-js/sanctuary-int#NonZeroInt') | ||
(function(x) { return test (Int) (x) && x !== 0; }); | ||
([Int]) | ||
(function(x) { return x !== 0; }); | ||
@@ -341,4 +340,3 @@ //# add :: Int -> Int -> Int | ||
var env = $.env.concat ([Int, NonZeroInt]); | ||
var def = $.create ({checkTypes: true, env: env}); | ||
var def = $.create ({checkTypes: true, env: $.env}); | ||
return (Object.keys (_)).reduce (function(int, name) { | ||
@@ -345,0 +343,0 @@ int[name] = def (name) ({}) (_[name].types) (_[name].impl); |
{ | ||
"name": "sanctuary-int", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "A collection of functions which operate on 32-bit signed integers", | ||
@@ -17,9 +17,9 @@ "license": "MIT", | ||
"dependencies": { | ||
"sanctuary-def": "0.17.x" | ||
"sanctuary-def": "0.20.x" | ||
}, | ||
"devDependencies": { | ||
"jsverify": "0.8.x", | ||
"sanctuary-scripts": "2.0.x", | ||
"sanctuary-scripts": "3.2.x", | ||
"sanctuary-show": "1.0.x", | ||
"sanctuary-type-classes": "9.0.x" | ||
"sanctuary-type-classes": "11.0.x" | ||
}, | ||
@@ -26,0 +26,0 @@ "files": [ |
@@ -7,7 +7,7 @@ # sanctuary-int | ||
#### <a name="Int" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L29">`Int :: Type`</a> | ||
#### <a name="Int" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L26">`Int :: Type`</a> | ||
The Int type represents integers in the range [-2^31 .. 2^31). | ||
#### <a name="NonZeroInt" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L37">`NonZeroInt :: Type`</a> | ||
#### <a name="NonZeroInt" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L35">`NonZeroInt :: Type`</a> | ||
@@ -17,3 +17,3 @@ The NonZeroInt type represents non-zero integers in the range | ||
#### <a name="add" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L46">`add :: Int -> Int -> Int`</a> | ||
#### <a name="add" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L45">`add :: Int -> Int -> Int`</a> | ||
@@ -27,3 +27,3 @@ Returns the sum of its two arguments. | ||
#### <a name="sub" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L64">`sub :: Int -> Int -> Int`</a> | ||
#### <a name="sub" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L63">`sub :: Int -> Int -> Int`</a> | ||
@@ -38,3 +38,3 @@ Returns the result of subtracting its first argument from its second | ||
#### <a name="mul" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L83">`mul :: Int -> Int -> Int`</a> | ||
#### <a name="mul" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L82">`mul :: Int -> Int -> Int`</a> | ||
@@ -48,3 +48,3 @@ Returns the product of its two arguments. | ||
#### <a name="quot" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L101">`quot :: NonZeroInt -> Int -> Int`</a> | ||
#### <a name="quot" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L100">`quot :: NonZeroInt -> Int -> Int`</a> | ||
@@ -72,3 +72,3 @@ Returns the result of dividing its second argument by its first | ||
#### <a name="rem" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L133">`rem :: NonZeroInt -> Int -> Int`</a> | ||
#### <a name="rem" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L132">`rem :: NonZeroInt -> Int -> Int`</a> | ||
@@ -97,3 +97,3 @@ Integer remainder, satisfying: | ||
#### <a name="div" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L166">`div :: NonZeroInt -> Int -> Int`</a> | ||
#### <a name="div" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L165">`div :: NonZeroInt -> Int -> Int`</a> | ||
@@ -121,3 +121,3 @@ Returns the result of dividing its second argument by its first | ||
#### <a name="mod" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L198">`mod :: NonZeroInt -> Int -> Int`</a> | ||
#### <a name="mod" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L197">`mod :: NonZeroInt -> Int -> Int`</a> | ||
@@ -146,3 +146,3 @@ Integer modulus, satisfying: | ||
#### <a name="and" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L231">`and :: Int -> Int -> Int`</a> | ||
#### <a name="and" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L230">`and :: Int -> Int -> Int`</a> | ||
@@ -157,3 +157,3 @@ [Bitwise AND][&]. Returns an Int with a one at each bit position at | ||
#### <a name="or" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L250">`or :: Int -> Int -> Int`</a> | ||
#### <a name="or" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L249">`or :: Int -> Int -> Int`</a> | ||
@@ -168,3 +168,3 @@ [Bitwise OR][|]. Returns an Int with a one at each bit position at | ||
#### <a name="xor" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L269">`xor :: Int -> Int -> Int`</a> | ||
#### <a name="xor" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L268">`xor :: Int -> Int -> Int`</a> | ||
@@ -179,3 +179,3 @@ [Bitwise XOR][^]. Returns an Int with a one at each bit position at | ||
#### <a name="not" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L288">`not :: Int -> Int`</a> | ||
#### <a name="not" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L287">`not :: Int -> Int`</a> | ||
@@ -191,3 +191,3 @@ [Bitwise NOT][~], satisfying: | ||
#### <a name="even" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L306">`even :: Int -> Boolean`</a> | ||
#### <a name="even" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L305">`even :: Int -> Boolean`</a> | ||
@@ -201,3 +201,3 @@ Returns `true` if its argument is even; `false` if it is odd. | ||
#### <a name="odd" href="https://github.com/sanctuary-js/sanctuary-int/blob/v2.0.0/index.js#L322">`odd :: Int -> Boolean`</a> | ||
#### <a name="odd" href="https://github.com/sanctuary-js/sanctuary-int/blob/v3.0.0/index.js#L321">`odd :: Int -> Boolean`</a> | ||
@@ -204,0 +204,0 @@ Returns `true` if its argument is odd; `false` if it is even. |
Sorry, the diff of this file is not supported yet
13358
324
+ Addedsanctuary-def@0.20.1(transitive)
+ Addedsanctuary-either@1.2.0(transitive)
+ Addedsanctuary-type-classes@11.0.0(transitive)
- Removedsanctuary-def@0.17.2(transitive)
- Removedsanctuary-either@1.0.0(transitive)
- Removedsanctuary-type-classes@9.0.0(transitive)
- Removedsanctuary-type-identifiers@1.0.0(transitive)
Updatedsanctuary-def@0.20.x