Reason: Extensible variants reformat to Ocaml

Created on 26 Dec 2016  路  6Comments  路  Source: reasonml/reason

module Attr = {
    type t = int;
};
type tag 'props = ..;
type ttype = Type;
type description 'props = {
  ttype: ttype,
  props: 'props
};
type element = Native (tag 'props) (description 'props): element;

type attrProps = { attr: Attr.t };

type tag 'props += Attr: tag attrProps;

module Attr = {
  type t = int;
};

type tag 'props = ..;

type ttype =
  | Type;

type description 'props = {ttype: ttype, props: 'props};

type attrProps = {attr: Attr.t};

type 'props tag +=
  | Attr: attrProps tag;

Notice how the extension of the variant gets reformatted to something halfway Ocaml, halfway Reason.

GOOD FIRST TASK

Most helpful comment

This is done. @jordwalke cough up the money! lol

All 6 comments

Whoever fixes this, please mark yourself as the assignee. Please add test cases as well.

Bountysource

@IwanKaramazow are you on master? If not, which version.

I'm on master. My package.json includes "reason": "facebook/reason".
Will fix this myself, is blocking me too much on RED

Okay thank you. I'll assign it to you.

This is done. @jordwalke cough up the money! lol

Let me know if bounty source doesn't do its thing correctly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chenglou picture chenglou  路  3Comments

rickyvetter picture rickyvetter  路  3Comments

bluddy picture bluddy  路  3Comments

jberdine picture jberdine  路  3Comments

kyldvs picture kyldvs  路  3Comments