An open API service indexing awesome lists of open source software.

https://github.com/dv8fromtheworld/haskell-shortcut-fusion-generation

Program that can generate Fold and Build declarations for Haskell GADTs
https://github.com/dv8fromtheworld/haskell-shortcut-fusion-generation

cli code-generation gadt haskell shortcut-fusion

Last synced: about 2 months ago
JSON representation

Program that can generate Fold and Build declarations for Haskell GADTs

Awesome Lists containing this project

README

        

# haskell-shortcut-fusion-generation

This program takes in a file in containing 1 GADT declaration and will output a generated fold and build function similar to an ADT's Deriving Foldable for the GADT.

### Setup
1) Download The Haskell Platform (ghc, cabal, etc): https://www.haskell.org/platform/
2) Update the Cabal package list: Run `cabal update`
3) Clone the project to a local folder
4) Install the project and its dependencies. Run `cabal install`.
This will install all external dependencies needed and compile the project, installing it to a PATH discoverable location.

With the project configured and installed, you can now run it from anywhere on your commandline.

### Use
`scf-gen infile outfile`

You may have to use the executable directly at
`./dist/builder/scf-gen/scf-gen`

The infile must be a valid text file containing *only* a GADT declaration. You can find a few examples in the `tests/` directory.