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-21 10:41:59 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
8ecb1aaf95
Idris2
/
tests
/
idris2
/
total010
/
PartialWith.idr
11 lines
111 B
Idris
Raw
Normal View
History
Unescape
Escape
Fix bug #654 Auxiliary functions introduced in elaboration (e.g., through case splits and with clauses) now have the same totality annotation as the function they're defined in. Moved auxiliary function `findSetTotal` into `Context.idr` since it's now used by `ProcessDef.idr` too. Added a totality requirement argument to `checkClause` so that the with-clause case could propagate it to the functions it generates in elaboration. Sandwhich the rhs elaboration in pattern matches with code that sets the global, default, totality requirement to the current one, and restores the previous default afterwards. It's a bit of a hacky way to do it, but I don't think we have a better alternative with the current design.
2020-09-09 19:09:48 +03:00
%
default
total
Remove trailing whitespaces and add trailing newlines
2021-01-16 10:03:45 +03:00
partial
Fix bug #654 Auxiliary functions introduced in elaboration (e.g., through case splits and with clauses) now have the same totality annotation as the function they're defined in. Moved auxiliary function `findSetTotal` into `Context.idr` since it's now used by `ProcessDef.idr` too. Added a totality requirement argument to `checkClause` so that the with-clause case could propagate it to the functions it generates in elaboration. Sandwhich the rhs elaboration in pattern matches with code that sets the global, default, totality requirement to the current one, and restores the previous default afterwards. It's a bit of a hacky way to do it, but I don't think we have a better alternative with the current design.
2020-09-09 19:09:48 +03:00
foo
:
Nat
->
Nat
foo
Z
=
Z
partial
bar
:
Nat
->
Nat
bar n
with
(
0
)
bar n
|
k
=
foo n
Reference in New Issue
Copy Permalink