~singpolyma/dhall-ruby

ref: ef67435f5e2b0937c1da262d59c6a10394203743 dhall-ruby/lib/dhall/as_dhall.rb -rw-r--r-- 5.4 KiB
Use Dhall names for everything that encodes untagged
Disambiguate hoisted union tags properly

An array may contain two nomnatively-equivalent types who are
structurally different -- so they need different (but related) union
tags since they will not share a type.
as_dhall for Proc

Cannot actually serialize this, but can be useful for passing functions
in to Dhall functions, etc.
Hoist single-label enum into array
Split Union and Enum

Stop putting special case conditionals for Union#value.nil? everywhere
and just split the classes.
Allow as_dhall to be customised by encode_with

Dhall has a goal to replace YAML.  Ruby's ecosystem already has deep
integration with YAML (specifically with the Psych implementation in
stdlib) -- so if an object customises its YAML encoding, but doesn't
know about Dhall, customise the Dhall encoding in a compatible way.
Do not deep-annotate OpenStruct#as_dhall
Encoding binary string as List Natural

Certainly better than an error, and gives the dhall side access to the
individual bytes.
as_dhall for Symbol
Add grab-bag of useful utils onto expressions
nil hash values are omitted from record
Add as_dhall refinement