1
1
mirror of https://github.com/tweag/asterius.git synced 2024-10-05 21:30:49 +03:00
asterius/utils
2020-03-26 16:09:44 +01:00
..
clean.sh Util scripts for cleaning & rebuilding (#304) 2019-10-01 19:08:07 +08:00
format.hs Apply ormolu on the last master commit (#325) 2019-10-14 16:56:53 +08:00
ghcid.sh Fix blackholing behavior with multi-threading (#493) 2020-03-18 00:16:48 +01:00
readme.md Fix blackholing behavior with multi-threading (#493) 2020-03-18 00:16:48 +01:00
reboot.sh Simplify the booting process (#507) 2020-03-26 16:09:44 +01:00

Util scripts

This directory contains util scripts for hacking on asterius.

Shell scripts

These scripts are meant to be called at the project root directory.

  • utils/clean.sh: Clean up the ghc-toolkit and asterius packages, removing the source & compiled objects of the boot libs.
  • utils/ghcid.sh: The script used by ghcid for asterius; do not run it directly, instead just run ghcid from the project root directory. Modify the script to add the source of an executable/test target when needed. This doesn't require a previous boot, but does require a stack build of asterius, even if it fails midway, since it treats the auto-generated Paths_asterius.hs as an input source file as well.
  • utils/reboot.sh: Do the cleanup, rebuild and reboot, using all CPU cores. If you touch the source of boot libs in ghc-toolkit/ or modify the IR/codegen of asterius, the boot cache may be out-of-sync so you need to run this script. Set the ASTERIUS_DEBUG=1 environment variable to enable the IR dumps.

Formatting IR dumps with pretty-show

utils/format.hs is a script to format IR dumps with pretty-show. It's used in very early days of this project and most likely bit rotten; open an issue to fix this script when the IR dumps need to be eyeballed again.