Move main function into `Effect Int`
felixSchl opened this issue · 1 comments
felixSchl commented
Either:
- mandate this for all
main
functions, - or detect at compile time based on the type of
main
(if that information is even available), - or by checking the return value at runtime: if
NULL
(implyingUnit
), return 0, else returnpurs_any_get_int(...)
of result.
felixSchl commented
(3) has been implemented. Programs returning Unit return 0 and programs returning Int return the returned integer. Use --non-strict-main
to avoid special handling altogether: the returned value is released and we return 0.