We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Koka 3.1.2, the following program is accepted:
fip fun test( b : bool ) : maybe<(int, int)> if b then Just((1, 2)) else Nothing
but it is compiled to the following code:
kk_std_core_types__maybe kk_test7_test(bool b, kk_context_t* _ctx) { /* (b : bool) -> maybe<(int, int)> */ if (b) { kk_box_t _x_x6; kk_std_core_types__tuple2 _x_x7 = kk_std_core_types__new_Tuple2(kk_integer_box(kk_integer_from_small(1), _ctx), kk_integer_box(kk_integer_from_small(2), _ctx), _ctx); /*(1038, 1039)*/ _x_x6 = kk_std_core_types__tuple2_box(_x_x7, _ctx); /*1027*/ return kk_std_core_types__new_Just(_x_x6, _ctx); } { return kk_std_core_types__new_Nothing(_ctx); } }
Since the tuple in the Just constructor is boxed, this example allocates and is in fact not fip.
Just
fip
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In Koka 3.1.2, the following program is accepted:
but it is compiled to the following code:
Since the tuple in the
Just
constructor is boxed, this example allocates and is in fact notfip
.The text was updated successfully, but these errors were encountered: