Dhall-ruby release announcements

(Stephen Paul Weber) #1

Obviously early days, but fully functional with the latest version of the standard: https://rubygems.org/gems/dhall

Try it out and let me know how it goes!

This release conforms to dhall-lang standard version v6.0.0-29-gd317261,
but in practise should work with most v6.0.0 expressions.

Repository and readme: https://git.sr.ht/~singpolyma/dhall-ruby

(Stephen Paul Weber) #2

0.2.0 is out now, copying changelog here:

Update to dhall-lang 0.7.0, add Dhall::Coder, etc

Breaking Changes

  • Version of dhall-lang supported: 0.7.0
  • Parse environment variable import contents as expressions, not just
    paths (was a bug)
  • Dhall.load defaults to a 10 second timeout and max import depth of 50
  • Dhall.load and imports now treat the value as UTF-8 source text if the
    bytes are valid UTF-8 and there are no control characters
  • Standard resolver now refuses to import binary expressions by default
  • Standard resolver now uses the standard disk cache by default
  • Builtin types are now Dhall::Builtins[:Bool] etc
  • String#as_dhall now encodes to List Natural if it is a binary string
  • Symbol#as_dhall now encodes as < symbol > instead of < Symbol = {=} >
  • OpenStruct#as_dhall no longer includes type annotations for all
  • Object#as_dhall now uses #encode_with if present

New Features

  • Dhall::Builtins[:Name_of_builtin] to get any builtin (type or
  • yaml-to-dhall can translate Symbol
  • Dhall.load now calls to_s on its argument (should allow passing a
    Pathname, for example)
  • Resolver readers and caches can return Expression instances directly
    instead of bytes to parse
  • Dhall::Coder (see README)
  • Dhall.load takes an optional timeout parameter
  • Resolvers now take optional max_depth and cache parameters

(Stephen Paul Weber) #3

0.3.0 is out now, copying changelog here:

Coder + multiline string improvements. Bugfixes

Breaking Changes

  • as_dhall on array now flattens nested unions if they would be generated
  • as_dhall now uses Dhallish names for tags on generated unions for all
    elements that can be represented untagged
  • as_dhall only adds hash to tag name when needed
  • Coder treats all Dhallish tags as extractable instead of trying to revive
  • Coder strips any underscore-then-sha256hex suffix from a tag when reviving


  • Coder decode on Proc works now
  • Fix for substitution on LetBlock/LetIn
  • Fix typechecking partially-applied builtins
  • Fix “stack level too deep” on long multiline comment
  • Fix for typechecking lists where elements had different, but compatible,
  • Fix for IP address parsing in imports (from upstream)

New Features

  • Tabs and blank lines allowed in multiline strings (standard version
    v7.0.0-21-g092996d now supported)
  • Self-describe CBOR tag allowed anywhere
  • as_dhall for Proc, cannot be serialized but useful for calling Dhall function
  • dhall-compile: new command to resolve, normalize, and seralize whole
    directories of Dhall code