Skip to content
New issue

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

Add builtin if #1585

Merged
merged 1 commit into from
Oct 14, 2022
Merged

Add builtin if #1585

merged 1 commit into from
Oct 14, 2022

Commits on Oct 13, 2022

  1. Add builtin if

    ```
    builtin boolean-if
    if : {A : Type} → Bool → A → A → A;
    if true x _ := x;
    if false _ x := x;
    ```
    
    This allows a backend to translate if directly, so that only one branch
    is evalutated.
    
    An example compilation of if is given for the legacy backend for testing.
    paulcadman committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    ce06b6f View commit details
    Browse the repository at this point in the history