|
|
|
|
|
by Gabriel439
2686 days ago
|
|
You can do more than just compare the output of two programs in Dhall. You can verify using a semantic integrity check that two programs are the same for all possible inputs. For example: $ dhall hash <<< 'λ(x : Natural) → x + 0'
sha256:986613701cf8cc883c2490af81d5fdcfb0f33f840870acaac21689f57c1baab6
$ dhall hash <<< 'λ(x : Natural) → x'
sha256:986613701cf8cc883c2490af81d5fdcfb0f33f840870acaac21689f57c1baab6
$ dhall hash <<< 'λ(y : Natural) → y'
sha256:986613701cf8cc883c2490af81d5fdcfb0f33f840870acaac21689f57c1baab6
The cryptographic hash is smart enough that many behavior-preserving changes don't perturb the hash. |
|