Skip to content

Commit

Permalink
just format uses ghc flags in juvix.cabal
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Jun 19, 2024
1 parent 235d88f commit 8b57478
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,18 @@ default:

@_ormoluCmd filesCmd:
{{ trim(filesCmd) }} \
| xargs -r {{ ormolu }} --no-cabal \
--ghc-opt -XStandaloneDeriving \
--ghc-opt -XUnicodeSyntax \
--ghc-opt -XDerivingStrategies \
--ghc-opt -XPatternSynonyms \
--ghc-opt -XMultiParamTypeClasses \
--ghc-opt -XTemplateHaskell \
--ghc-opt -XImportQualifiedPost \
--ghc-opt -XBangPatterns \
--mode inplace
| xargs -r {{ ormolu }} --mode inplace

# Formats all Haskell files in the project. `format changed` formats only changed files. `format FILES` formats individual files.
format *opts:
#!/usr/bin/env bash
set -euo{{ bashDebugArg }} pipefail
if [ ! -e "juvix.cabal" ]; then
echo "Error: juvix.cabal does not exist. Please, run \`just install\` or \`stack setup\` first"
exit 1
fi

opts='{{ trim(opts) }}'

case $opts in
Expand Down

0 comments on commit 8b57478

Please sign in to comment.