Skip to content

Commit

Permalink
test: show bug compiling custom true / false constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Sep 24, 2024
1 parent fa047d9 commit 7cad3bf
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/blackbox-tests/custom-predef.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Demonstrate redefining the `true` / `false` constructors

$ . ./setup.sh
$ cat > x.ml <<EOF
> type t = A | true | false
> let z : t = A
> let x : t = true
> let y : t = false
> let t : bool = false
> EOF
$ melc -ppx melppx x.ml
// Generated by Melange
'use strict';
const z = /* A */0;
const x = true;
const y = true;
const t = false;
exports.z = z;
exports.x = x;
exports.y = y;
exports.t = t;
/* No side effect */

0 comments on commit 7cad3bf

Please sign in to comment.