This website requires JavaScript.
Explore
Help
Sign In
idris-lang
/
Idris2
Watch
1
Star
1
Fork
0
You've already forked Idris2
mirror of
https://github.com/idris-lang/Idris2.git
synced
2024-12-25 04:33:45 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
44fc58013a
Idris2
/
tests
/
idris2
/
basic029
/
Params.idr
4 lines
57 B
Idris
Raw
Normal View
History
Unescape
Escape
Implement new parameters syntax Previously, parameter block reused the same syntax as in Idris1: ``` parameters (v1 : t1, … , vn : tn) ``` Unfortunately this syntax presents some issues: - It does not allow to declare implicit parameters - It does not allow to specify which multiplicity to use - It is inconsistent with the syntax used for named arguments elsewhere in the language. This change fixes those three problems by borrowing the syntax for declaring type parameters in records: ``` parameters (v1 : t2) (v2 : t2) … (vn : tn) ``` It also enables other features like multiple declarations of arguments with the same type: ``` parameters (v1, v2 : Type) ```
2021-04-19 19:48:53 +03:00
parameters
(
x
:
Nat
)
(
y
:
Nat
)
Add test script They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
2020-05-19 20:25:18 +03:00
add
:
Nat
add
=
x
+
y
Reference in New Issue
Copy Permalink