Created
December 2, 2017 18:14
-
-
Save Lupus/dff17699568652495fce6b07969eb96b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by BUCKLESCRIPT VERSION 1.9.2, PLEASE EDIT WITH CARE | |
'use strict'; | |
var Caml_missing_polyfill = require("stdlib/caml_missing_polyfill"); | |
function foo (x) { | |
if (x == 0) return null; | |
else if (x == 1) return 0; | |
return "bar"; | |
} | |
; | |
Caml_missing_polyfill.not_implemented(" not implemented by bucklescript yet\n"); | |
/* Not a pure module */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type t = | |
| Int(int) | |
| String(string); | |
type returnType = Js.nullable(t); | |
[%%bs.raw{| | |
function foo (x) { | |
if (x == 0) return null; | |
else if (x == 1) return 0; | |
return "bar"; | |
} | |
|}]; | |
external foo: int => returnType = ""; | |
foo(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment