0.0.9-babel.6 • Published 7 years ago
monadic.js v0.0.9-babel.6
monadic.js
Parser and Plugin for babel that provides haskell-like do-notation into javascript.
Should work with babel6
Setup
- Install monadic.js:
npm install --save-dev monadic.js
- Add plugin to babel's plugins list, and set monadic.js parser as babel's parser:
Part of webpack config (as an example):
//...
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader",
query: {
presets: [ "es2015", "stage-0" ],
plugins: [ "monadic.js/dist/plugin.js" ],
parserOpts: {
parser: "monadic.js/dist/parser.js"
}
}
}
]
//...
Usage
In progress... Stay tuned...
You can take a look at, first: https://github.com/kirill-gavrilyuk/Scratch2/blob/master/src/app/main.js
Some (maybe) useful articles about monads:
0.0.9-babel.6
7 years ago
0.0.8-babel.6
7 years ago
0.0.7-babel.6
8 years ago
0.0.6-babel.6
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago