New +plum output format.

This commit is contained in:
C. Guy Yarvin 2018-04-10 18:51:33 -07:00
parent 8b98fce459
commit e0a155d2d3

View File

@ -417,6 +417,51 @@
++ date {{a/? y/@ud} m/@ud t/tarp} :: parsed date ++ date {{a/? y/@ud} m/@ud t/tarp} :: parsed date
++ knot @ta :: ASCII text ++ knot @ta :: ASCII text
++ noun * :: any noun ++ noun * :: any noun
++ plum :: new output noun
=> |%
:: +deco: output decoration
::
++ deco
$: :: wide: one-line syntax
::
$= wide
:: default to wide regular form
::
%- unit
:: specify irregular syntax
::
$: :: delimit: delimiter between items
:: enclose: enclosure around items
::
delimit=knot
enclose=(pair knot knot)
==
:: tall: multiline syntax
::
$= tall
$: :: intro: initial rune (like |%)
:: sigil: before each item (like ++)
:: final: final rune (like --)
::
intro=knot
sigil=knot
final=knot
== ==
--
$@ cord
$~ [%cold %$ ~]
$% :: %cold: printable atom
:: %leaf: tape (deprecated, do not use)
:: %good: standardized noun
:: %soar: fixed-width list
:: %tilt: fixed-width tuple
::
[%cold aura=@tas atom=@]
[%good mark=@tas =noun]
[%leaf =tape]
[%soar =deco list=(list plum)]
[%tilt =deco list=(list plum)]
==
++ tang (list tank) :: bottom-first error ++ tang (list tank) :: bottom-first error
++ tank $~ [%leaf ~] :: ++ tank $~ [%leaf ~] ::
$% {$leaf p/tape} :: printing formats $% {$leaf p/tape} :: printing formats
@ -6698,32 +6743,27 @@
=| block-count=@ud =| block-count=@ud
=| block-map=(map @ud type) =| block-map=(map @ud type)
:: ::
:: sut: non-void type we're analyzing :: sut: type we're analyzing
:: ::
=| sut/type =| sut/type
=< :: public interface =< :: public interface
:: ::
|? |% |? |%
:: ::
:: +structure:cosmetic: structure and context for type inspection :: +structure: make cosmetic hoon representing :sut
:: ::
++ structure ++ structure
^- $: :: main: cosmetically correct structure description ^- hoon
:: context: recursion points by synthetic name
::
main=spec
context=(map @tas spec)
==
!! !!
:: ::
:: +pattern:cosmetic: pattern and context for data inspection :: +pattern: pattern and context for data inspection
:: ::
++ pattern ++ pattern
^- $: :: main: rendering pattern ^- $: :: main: rendering pattern
:: context: recursion points by counter :: context: recursion points by counter
:: ::
main=plot main=plot
context=(map @ud plot) loop=(map @ud plot)
== ==
!! !!
-- --
@ -6761,16 +6801,18 @@
sut ~(repo ut sut) sut ~(repo ut sut)
hold-trace (~(put in hold-trace) sut) hold-trace (~(put in hold-trace) sut)
== ==
:- `spec`[%bcmc %limb (synthetic block-count)] :- [%bcmc %limb (synthetic block-count)]
%_ . %_ .
block-count +(block-count) block-count +(block-count)
block-map (~(put by block-map) block-count sut) block-map (~(put by block-map) block-count sut)
== == == ==
::
:: +reform: rationalize spec decoration :: +reform: rationalize spec decoration
:: ::
++ reform ++ reform
|= [=type =spec] |= [=type =spec]
spec spec
::
:: +simplify: identify and reduce patterns :: +simplify: identify and reduce patterns
:: ::
++ simplify ++ simplify
@ -7031,6 +7073,7 @@
++ unfold ++ unfold
|= [fun/hoon arg/(list spec)] |= [fun/hoon arg/(list spec)]
^- hoon ^- hoon
?~ arg fun
[%cncl fun (turn arg |=(spec bccm/+<))] [%cncl fun (turn arg |=(spec bccm/+<))]
:: ::
++ descend ++ descend