gas

Limit how many steps a program may take.

Latest on Hackage:0.0.0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed
Maintained by rightfold

Programs constructed using free applicatives or free monads may be analyzed statically or dynamically (respectively). This package uses such analysis to limit the number of steps the program may take. This is useful for EDSLs with untrusted input, or in general when you want to guarantee termination by cutting off a program.

Note that this package does not avoid infinite loops in bottom values. Use the System.Timeout module for that instead.