mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
hoon: improve $pith pattern mode syntax
Produce the correct type, support the ~ element, allow specifying an open-ended type.
This commit is contained in:
parent
5af620176e
commit
01a6b8a16a
@ -13132,15 +13132,23 @@
|
||||
;~ pose
|
||||
:: /name=@aura
|
||||
::
|
||||
%+ stag %bcts
|
||||
;~ plug sym
|
||||
;~ pfix tis pat
|
||||
(stag %base (stag %atom mota))
|
||||
== ==
|
||||
%+ cook
|
||||
|= [=term =aura]
|
||||
^- spec
|
||||
:+ %bccl
|
||||
[%leaf %tas aura]
|
||||
[%bcts term [%base %atom aura]]~
|
||||
;~(plug sym ;~(pfix tis pat mota))
|
||||
::
|
||||
:: /constant
|
||||
::
|
||||
(stag %leaf (stag %tas sym))
|
||||
(stag %leaf (stag %tas ;~(pose sym (cold %$ buc))))
|
||||
==
|
||||
::
|
||||
:: /~
|
||||
::
|
||||
:- '~'
|
||||
(cold [%bccl [%leaf %tas %n] [%base %null] ~] sig)
|
||||
==
|
||||
::
|
||||
;~ pose
|
||||
|
Loading…
Reference in New Issue
Block a user