ear7h / dhall-io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dhall-io

An unsuccessful attempt putting IO in Dhall

Problem

The current approach uses unsafeIO to execute IO computations in the normalizer. However, the normalization algorithm provides no guaratees about redundant calls to normalize. Indeed, it calls functions in an exponential manner:

1121123112112341121123112112345

The source program was supposed to make 5 write calls, one per digit.

Possible fixes

Check the normalization algorithm (doesn't seem easy). Use an MVar and sequence numbers in the World structure, ignoring IO/step calls with numbers <= what's stored in MVar.

About

License:MIT License


Languages

Language:Dhall 55.0%Language:Haskell 40.8%Language:Nix 4.2%