Skip to content
Snippets Groups Projects
Select Git revision
  • new-unificator
  • master default protected
2 results

ruby-dhallish

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Lou Knauer authored
    This should not be as important any more as philipp fixed this
    issue in the master branch allready using another aproach, but at some point in the future i
    would like to fix all of this.
    bff8aa4c
    History

    Ruby-Implementation of a Dhall-like Language

    If you want to use Dhall in production and do not use ruby, use the official haskell version linked below.

    See ./tests for an example of dhallish-code that should work. .dhall-files show code that evaluates equally in dhall and dhallish. Code samples in ./tests/test.rb might be dhallish-specific. See ./bin/dhallish or ./tests/test_dhallish_ctx.rb for an example on how to use the Dhallish module.

    Read the docs!

    # run tests using:
    ruby ./tests/test.rb
    
    # use dhall as a command line tool:
    ./bin/dhallish --help
    ./bin/dhallish <<< "1 + 2"
    
    # examples and usage:
    cat ./tests/examples.dhallish
    ./bin/dhallish --help
    ./bin/dhallish < texts/examples.dhallish

    Changes to dhall-lang:

    • More Operators: <, >, <=, >=, -, /
    • == and != do work on Numbers (Naturals, Integers and Doubles)
    • It is possible to get an Optional from an union

    Missing Features:

    • ''strings that start with two quotes''
    • Kind and Sort (What are those?)
    • missing and integrity-hashes for imports
    • merge for empty Unions

    Known Bugs:

    • There is a bug in our unification or substitution that only appears in rare cases when the same name for a generic type is used multiple times.