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 (#41 by @JordanMartinez)

New features:

Expand Down
8 changes: 4 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"package.json"
],
"dependencies": {
"purescript-effect": "^3.0.0",
"purescript-either": "^5.0.0",
"purescript-maybe": "^5.0.0",
"purescript-prelude": "^5.0.0"
"purescript-effect": "master",
"purescript-either": "master",
"purescript-maybe": "master",
"purescript-prelude": "master"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,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"
}
}
30 changes: 14 additions & 16 deletions src/Effect/Exception.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
"use strict";

exports.showErrorImpl = function (err) {
export function showErrorImpl(err) {
return err.stack || err.toString();
};
}

exports.error = function (msg) {
export function error(msg) {
return new Error(msg);
};
}

exports.message = function (e) {
export function message(e) {
return e.message;
};
}

exports.name = function (e) {
export function name(e) {
return e.name || "Error";
};
}

exports.stackImpl = function (just) {
export function stackImpl(just) {
return function (nothing) {
return function (e) {
return e.stack ? just(e.stack) : nothing;
};
};
};
}

exports.throwException = function (e) {
export function throwException(e) {
return function () {
throw e;
};
};
}

exports.catchException = function (c) {
export function catchException(c) {
return function (t) {
return function () {
try {
Expand All @@ -44,4 +42,4 @@ exports.catchException = function (c) {
}
};
};
};
}