mirror of
https://github.com/anoma/juvix.git
synced 2024-10-03 19:47:59 +03:00
just format
uses ghc flags in juvix.cabal (#2844)
This commit is contained in:
parent
33d565037d
commit
9e6e8d8a35
16
justfile
16
justfile
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user