urbit/pkg/arvo/sur/sole.hoon

89 lines
5.6 KiB
Plaintext
Raw Normal View History

2015-12-10 07:05:58 +03:00
::
2016-02-11 03:41:28 +03:00
:::: /hoon/sole/sur
2016-11-17 04:42:58 +03:00
::
2018-12-11 22:38:44 +03:00
^?
|%
2015-03-28 13:57:02 +03:00
++ sole-action :: sole to app
2019-11-22 03:51:52 +03:00
$: id=@ta :: duct id
$= dat
$% :: {%abo ~} :: reset interaction
{%det sole-change} :: command line edit
{%ret ~} :: submit and clear
{%clr ~} :: exit context
{%tab pos=@ud} :: tab complete
2019-11-22 03:51:52 +03:00
== ::
==
2015-12-09 04:54:26 +03:00
++ sole-buffer (list @c) :: command state
2015-03-28 13:57:02 +03:00
++ sole-change :: network change
$: ler=sole-clock :: destination clock
haw=@uvH :: source hash
ted=sole-edit :: state change
2015-02-09 00:22:33 +03:00
== ::
++ sole-clock {own=@ud his=@ud} :: vector clock
2015-03-28 13:57:02 +03:00
++ sole-edit :: shared state change
$% {%del p=@ud} :: delete one at
{%ins p=@ud q=@c} :: insert at
{%mor p=(list sole-edit)} :: combination
{%nop ~} :: no-op
{%set p=sole-buffer} :: discontinuity
2015-02-09 00:22:33 +03:00
== ::
2015-03-28 13:57:02 +03:00
++ sole-effect :: app to sole
$% {%bel ~} :: beep
{%blk p=@ud q=@c} :: blink+match char at
{%clr ~} :: clear screen
{%det sole-change} :: edit command
{%err p=@ud} :: error point
{%klr p=styx} :: styled text line
{%mor p=(list sole-effect)} :: multiple effects
{%nex ~} :: save clear command
{%pro sole-prompt} :: set prompt
{%sag p=path q=*} :: save to jamfile
{%sav p=path q=@} :: save to file
{%tab p=(list {=cord =tank})} :: tab-complete list
{%tan p=(list tank)} :: classic tank
:: {%taq p=tanq} :: modern tank
{%txt p=tape} :: text line
{%url p=@t} :: activate url
2015-02-09 00:22:33 +03:00
== ::
2015-03-28 13:57:02 +03:00
++ sole-command :: command state
$: pos=@ud :: cursor position
say=sole-share :: cursor
2015-02-09 09:25:00 +03:00
== ::
2015-03-28 13:57:02 +03:00
++ sole-prompt :: prompt definition
$: vis=? :: command visible
tag=term :: history mode
cad=styx :: caption
2015-02-09 09:25:00 +03:00
== ::
2015-03-28 13:57:02 +03:00
++ sole-share :: symmetric state
$: ven=sole-clock :: our vector clock
leg=(list sole-edit) :: unmerged edits
buf=sole-buffer :: sole state
2015-02-09 00:22:33 +03:00
== ::
2015-09-12 00:15:25 +03:00
:: ::
:: ::
++ sole-dialog :: standard dialog
|* out=$-(* *) :: output structure
2016-02-04 10:12:23 +03:00
$-(sole-input (sole-result out)) :: output function
2015-09-12 00:15:25 +03:00
:: ::
++ sole-input tape :: prompt input
++ sole-result :: conditional result
|* out=$-(* *) :: output structure
2015-12-14 10:58:14 +03:00
$@(@ud (sole-product out)) :: error position
2015-09-12 00:15:25 +03:00
:: ::
++ sole-product :: success result
|* out=$-(* *) ::
2019-01-18 08:37:34 +03:00
%+ pair (list tank) ::
2015-09-12 00:15:25 +03:00
%+ each (unit out) :: ~ is abort
(pair sole-prompt (sole-dialog out)) :: ask and continue
:: ::
++ sole-gen :: XX virtual type
$% {%say $-((sole-args) (cask))} :: direct noun
{%ask $-((sole-args) (sole-product (cask)))} :: dialog
2015-09-12 00:15:25 +03:00
== ::
++ sole-args :: generator arguments
|* _[* *] ::
{{now=@da eny=@uvJ bek=beak} {,+<- ,+<+}} ::
2015-09-12 00:15:25 +03:00
:: ::
:: ::
2015-02-09 00:22:33 +03:00
--