Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/fourmolu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: fourmolu

on:
push:
branches: [ master, dev ]
paths: [ '**.hs' ]
pull_request_target:
branches: [ master, dev ]
paths: [ '**.hs' ]

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: haskell-actions/run-fourmolu@v11
with:
version: "0.17.0.0"
follow-symbolic-links: false
working-directory: "./compiler"
7 changes: 7 additions & 0 deletions compiler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ clean:
rm -rf ../bin
# If problems still persist after this, remove all GHC compilers in ~/.stack/programs/**/

# https://github.com/fourmolu/fourmolu
format:
fourmolu -i *.hs */*.hs

format/check:
fourmolu --mode check *.hs */*.hs

ghci-irtester:
stack ghci --main-is Troupe-compiler:exe:irtester --no-load

Expand Down
6 changes: 5 additions & 1 deletion compiler/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# PicoML-compiler
# TroupeC: Troupe Compiler

## Formatting

The Haskell code is formatted with [`fourmolu`](https://github.com/fourmolu/fourmolu).
1 change: 1 addition & 0 deletions compiler/Setup.hs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import Distribution.Simple

main = defaultMain
Loading
Loading