Coder Social home page Coder Social logo

bettererrors's Introduction

Before

Before

After

Glorious After

Before

Before

After

Glorious After

Work in progress!

npm install -g ocamlBetterErrors

Put this in your project's package.json:

{
  "scripts": {
    "start": "eval $(dependencyEnv) && nopam && which berror.native"
  },
  "dependencies": {
    "nopam": "*",
    "dependency-env": "*",
    "ocamlBetterErrors": "*"
  }
}

Running npm start with such configuration will expose the berror.native binary, for you to use like so:

ocamlc myApp.ml |& berror.native

Explanation: |& is a bash shortcut for 2>&1 | (not available in vanilla sh), which, in turn, means "pipe the stuff from stderr into stdout, then pipe it back into stdin of the next command". berror takes in this info and searches for errors to pretty-print back.

To format the output in Reason syntax, use berror --path-to-refmttype thePathToRefmttype (where refmttype is a binary exposed by Reason).

Have fun!

For Development

git clone this repo, cd into it, then run:

npm install
# to compile
npm start
# to test, currently broken
npm test

bettererrors's People

Contributors

andreyiv avatar bsansouci avatar chenglou avatar gasche avatar kayceesrk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.