This website requires JavaScript.
Explore
Help
Sign In
edwinb
/
Idris2-boot
Watch
1
Star
1
Fork
0
You've already forked Idris2-boot
mirror of
https://github.com/edwinb/Idris2-boot.git
synced
2024-12-24 05:12:29 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
ea0de3d499
Idris2-boot
/
tests
/
ttimp
/
basic004
/
input
6 lines
71 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Initial implementation of 'case' blocks It's not quite there yet, though, because the treatment of 'as' patterns isn't quite right and the slightly hacky approach we're taking might not be the best. Rethinking now...
2019-05-17 15:52:09 +03:00
simpleAs (S (S Z))
Add as patterns When we encounter them, not that they're a binding as normal, but also record the thing they expand to. Then bind as a PLet, and convert that to a Let on the RHS so it has computational force. The case tree compiler knows about as patterns, so they get compiled to use the appropriate name on the rhs (rather than a let).
2019-05-09 18:46:16 +03:00
as Z
as (S (S (S Z)))
pairPred (S (S (S (S Z))))
:q
Reference in New Issue
Copy Permalink