Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"parserOptions": {
"ecmaVersion": 5
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": "eslint:recommended",
"env": {
"commonjs": true
},
"rules": {
"strict": [2, "global"],
"block-scoped-var": 2,
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
- uses: actions/checkout@v2

- uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"

- uses: actions/setup-node@v1
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based
## [Unreleased]

Breaking changes:
- Migrate FFI to ES modules (#50 by @kl0tl and @JordanMartinez)

New features:

Expand Down
14 changes: 7 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"package.json"
],
"dependencies": {
"purescript-math": "^3.0.0",
"purescript-maybe": "^5.0.0",
"purescript-numbers": "^8.0.0",
"purescript-prelude": "^5.0.0"
"purescript-math": "master",
"purescript-maybe": "master",
"purescript-numbers": "master",
"purescript-prelude": "master"
},
"devDependencies": {
"purescript-assert": "^5.0.0",
"purescript-console": "^5.0.0",
"purescript-partial": "^3.0.0"
"purescript-assert": "master",
"purescript-console": "master",
"purescript-partial": "master"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"devDependencies": {
"eslint": "^7.15.0",
"pulp": "^15.0.0",
"purescript-psa": "^0.8.0",
"pulp": "16.0.0-0",
"purescript-psa": "^0.8.2",
"rimraf": "^3.0.2"
}
}
16 changes: 7 additions & 9 deletions src/Data/Int.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"use strict";

exports.fromNumberImpl = function (just) {
export const fromNumberImpl = function (just) {
return function (nothing) {
return function (n) {
/* jshint bitwise: false */
Expand All @@ -9,11 +7,11 @@ exports.fromNumberImpl = function (just) {
};
};

exports.toNumber = function (n) {
export const toNumber = function (n) {
return n;
};

exports.fromStringAsImpl = function (just) {
export const fromStringAsImpl = function (just) {
return function (nothing) {
return function (radix) {
var digits;
Expand All @@ -39,27 +37,27 @@ exports.fromStringAsImpl = function (just) {
};
};

exports.toStringAs = function (radix) {
export const toStringAs = function (radix) {
return function (i) {
return i.toString(radix);
};
};


exports.quot = function (x) {
export const quot = function (x) {
return function (y) {
/* jshint bitwise: false */
return x / y | 0;
};
};

exports.rem = function (x) {
export const rem = function (x) {
return function (y) {
return x % y;
};
};

exports.pow = function (x) {
export const pow = function (x) {
return function (y) {
/* jshint bitwise: false */
return Math.pow(x,y) | 0;
Expand Down
16 changes: 7 additions & 9 deletions src/Data/Int/Bits.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@
"use strict";

// module Data.Int.Bits

exports.and = function (n1) {
export const and = function (n1) {
return function (n2) {
/* jshint bitwise: false */
return n1 & n2;
};
};

exports.or = function (n1) {
export const or = function (n1) {
return function (n2) {
/* jshint bitwise: false */
return n1 | n2;
};
};

exports.xor = function (n1) {
export const xor = function (n1) {
return function (n2) {
/* jshint bitwise: false */
return n1 ^ n2;
};
};

exports.shl = function (n1) {
export const shl = function (n1) {
return function (n2) {
/* jshint bitwise: false */
return n1 << n2;
};
};

exports.shr = function (n1) {
export const shr = function (n1) {
return function (n2) {
/* jshint bitwise: false */
return n1 >> n2;
};
};

exports.zshr = function (n1) {
export const zshr = function (n1) {
return function (n2) {
/* jshint bitwise: false */
return n1 >>> n2;
};
};

exports.complement = function (n) {
export const complement = function (n) {
/* jshint bitwise: false */
return ~n;
};