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
- Host: GitHub
- URL: https://github.com/dv8fromtheworld/haskell-shortcut-fusion-generation
- Owner: DV8FromTheWorld
- License: apache-2.0
- Created: 2018-01-26T23:24:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-30T22:34:58.000Z (about 7 years ago)
- Last Synced: 2025-02-01T05:15:52.933Z (4 months ago)
- Topics: cli, code-generation, gadt, haskell, shortcut-fusion
- Language: Haskell
- Homepage:
- Size: 41 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
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.