hagl / dhall-unison

A Unison (https://www.unisonweb.org) implementation of the Dhall configuration language (https://dhall-lang.org).
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

Use Nat instead of Natural for De Bruijn index #3

Open hagl opened 2 years ago

hagl commented 2 years ago

I used the dhall reference implementation dhall-lang/standard as the basis when creating the types for the AST and also copied the unlimited precision integer Natural for the DeBruijn index of Expression.Variable. In reality a Nat will always be sufficient and would probably speed up shifting and unshifting of the indexes quite a bit.

hagl commented 2 years ago

Baseline for testsuite:

1468 total tests ( ✅ 1465 passed, 🚫 3 failed) in directory /Users/harald/projects/dhall-unison/dhall-lang Duration: 705.843s 1468 total tests ( ✅ 1465 passed, 🚫 3 failed) in directory /Users/harald/projects/dhall-unison/dhall-lang Duration: 712.027s 1468 total tests ( ✅ 1465 passed, 🚫 3 failed) in directory /Users/harald/projects/dhall-unison/dhall-lang Duration: 681.124s