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

Switch to uncurried functions #269

Open
brendanzab opened this issue Dec 3, 2020 · 0 comments
Open

Switch to uncurried functions #269

brendanzab opened this issue Dec 3, 2020 · 0 comments

Comments

@brendanzab
Copy link
Member

These might be a little less confusing to programmers from procedural languages, and might help us to simplify compilation to Rust somewhat (avoiding the need for an uncurring pass in the compiler). In practice, this would mean that we would use 'telescopes' for parameter lists rather than single parameter functions. For example:

Array        : (len : {l : Int | l >= 0}, Elem : Type) -> Type
Array.get    : [len, Elem](array : Array len Elem, index : {i : Int | i < len}) -> Elem
Array.repeat : [Elem](len : {l : Int | l >= 0}, elem : Elem) -> Array len Elem

Not sure about the syntax for implicit parameters. Square brackets might conflict with array terms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant