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.
- Dhall github project: https://github.com/dhall-lang
- Treetop library's home page: http://cjheath.github.io/treetop/index.html
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
dhall-lang
:
Changes to - More Operators:
<
,>
,<=
,>=
,-
,/
-
==
and!=
do work on Numbers (Natural
s,Integer
s andDouble
s) - It is possible to get an Optional from an union
Missing Features:
''strings that start with two quotes''
-
Kind
andSort
(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.