https://github.com/wolfadex/elm-review-forestry
An experimental rule for code generation
https://github.com/wolfadex/elm-review-forestry
Last synced: about 1 year ago
JSON representation
An experimental rule for code generation
- Host: GitHub
- URL: https://github.com/wolfadex/elm-review-forestry
- Owner: wolfadex
- License: bsd-3-clause
- Created: 2022-02-03T23:11:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-05T16:09:22.000Z (over 4 years ago)
- Last Synced: 2025-02-07T18:15:05.005Z (over 1 year ago)
- Language: Elm
- Size: 89.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-review-forestry
An exploratory rule for generating code. When enough context is available, it will attempt to replace specific `Debug.todo` with appropriate code. E.g. pattern matching a `Maybe` or `Result` into their branches.
Provides [`elm-review`](https://package.elm-lang.org/packages/jfmengels/elm-review/latest/) rules to generate code.
## Provided rules
- [`PruneTodo`](https://package.elm-lang.org/packages/wolfadex/elm-review-forestry/1.0.0/PruneTodo) - Attempts to replace instances of `Debug.todo ":prune"` with applicable code..
## Configuration
```elm
module ReviewConfig exposing (config)
import PruneTodo
import Review.Rule exposing (Rule)
config : List Rule
config =
[ PruneTodo.rule
]
```
## Try it out
You can try the example configuration above out by running the following command:
```bash
elm-review --template wolfadex/elm-review-forestry/example
```
---
Very much inspired by Haskell's [Wingman](https://haskellwingman.dev/) and [Program Synthesis in Idris](https://www.youtube.com/watch?v=brjFqXkUQv0).