diff --git a/.github/format.sh b/.github/format.sh index 3bea3de..2373ce1 100755 --- a/.github/format.sh +++ b/.github/format.sh @@ -1,5 +1,6 @@ #!/bin/bash -nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz \ - -p haskellPackages.fourmolu \ - --run 'make format_check' +# Extensions necessary to tell fourmolu about +EXTENSIONS="-o -XTypeApplications -o -XTemplateHaskell -o -XImportQualifiedPost -o -XPatternSynonyms -o -fplugin=RecordDotPreprocessor" +SOURCES=$(git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.hs') +~/.local/bin/fourmolu --mode check --check-idempotence $EXTENSIONS $SOURCES diff --git a/.gitignore b/.gitignore index 9699888..5ae1889 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ result-* .vscode/ .idea tags +TAGS .nvimrc *.tix diff --git a/src/Agora/AuthorityToken.hs b/src/Agora/AuthorityToken.hs index bbd2849..4b59f8d 100644 --- a/src/Agora/AuthorityToken.hs +++ b/src/Agora/AuthorityToken.hs @@ -24,7 +24,7 @@ import Plutarch.Prelude said transaction. Said validator should be made aware of _this_ token's existence in order to prevent incorrect minting. -} -data AuthorityToken = AuthorityToken +newtype AuthorityToken = AuthorityToken { -- | Token that must move in order for minting this to be valid. authority :: AssetClass }