Skip to content

kirill-havryliuk/monadic.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published