Skip to content

Commit

Permalink
just format uses ghc flags in juvix.cabal (#2844)
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira authored Jun 20, 2024
1 parent 33d5650 commit 9e6e8d8
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 9e6e8d8

Please sign in to comment.