8000 Miscompilation of option eliminator when option type is defined through manifest · Issue #691 · melange-re/melange · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Miscompilation of option eliminator when option type is defined through manifest #691
Closed
@andreypopp

Description

@andreypopp

Consider this snippet:

module X = struct
  type 'a t = 'a option = None | Some of 'a
end

let () = 
  match X.None with
  | Some _ -> Js.log "A BUG!"
  | None -> Js.log "OK"

which results in:

// Generated by Melange


var X = {};

console.log("A BUG!");

export {
  X ,
}
/*  Not a pure module */

Rescript handles this ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0