Compare commits

..

No commits in common. "30132088dfd495c651c693e9452495e93a91928b" and "9876e488c40f7c8cbeda55fe8ca11df0fb541fb7" have entirely different histories.

7 changed files with 26 additions and 32 deletions

View file

@ -11,7 +11,7 @@
}; };
outputs = { self, nixpkgs, flake-utils, pre-commit-hooks }: outputs = { self, nixpkgs, flake-utils, pre-commit-hooks }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
@ -27,13 +27,13 @@
# Dependency overrides go here # Dependency overrides go here
}; };
packages.default = self.packages.${system}.${packageName}; defaultPackage = self.packages.${system}.${packageName};
apps = { apps = {
# run with: nix run #.hcat # run with: nix run #.hcat
hcat = { hcat = {
type = "app"; type = "app";
program = "${self.packages.${system}.default}/bin/hcat"; program = "${self.defaultPackage.${system}}/bin/hcat";
}; };
# run with: nix run # run with: nix run
@ -43,28 +43,25 @@
checks = { checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run { pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.; src = ./.;
settings = { ormolu.defaultExtensions = [ "GHC2021" ]; };
tools.fourmolu = haskellPackages.fourmolu;
hooks = { hooks = {
nixfmt.enable = true; nixfmt.enable = true;
fourmolu.enable = true; fourmolu.enable = true;
hpack.enable = true; hpack.enable = true;
hlint.enable = true; hlint.enable = true;
doctest = { doctest = {
enable = false; enable = true;
name = "Run documentation tests"; name = "Run documentation tests";
entry = "${haskellPackages.doctest}/bin/doctest src app"; entry = "doctest";
files = "\\.l?hs$"; files = "\\.l?hs$";
pass_filenames = false;
}; };
}; };
}; };
}; };
devShells.default = haskellPackages.shellFor { devShell = haskellPackages.shellFor {
inherit (self.checks.${system}.pre-commit-check) shellHook; inherit (self.checks.${system}.pre-commit-check) shellHook;
packages = p: [ self.packages.${system}.default ]; packages = p: [ self.defaultPackage.${system} ];
withHoogle = true; withHoogle = true;

View file

@ -1,2 +1 @@
haddock-style: single-line haddock-style: single-line
indentation: 2

View file

@ -24,9 +24,9 @@ library
hs-source-dirs: hs-source-dirs:
src src
default-extensions: default-extensions:
GHC2021
BlockArguments BlockArguments
OverloadedStrings OverloadedStrings
ImportQualifiedPost
ghc-options: -Wall -Wunused-packages -fdefer-typed-holes ghc-options: -Wall -Wunused-packages -fdefer-typed-holes
build-depends: build-depends:
base >=4.13 && <5 base >=4.13 && <5
@ -40,9 +40,9 @@ executable hcat
hs-source-dirs: hs-source-dirs:
app app
default-extensions: default-extensions:
GHC2021
BlockArguments BlockArguments
OverloadedStrings OverloadedStrings
ImportQualifiedPost
ghc-options: -Wall -Wunused-packages -fdefer-typed-holes ghc-options: -Wall -Wunused-packages -fdefer-typed-holes
build-depends: build-depends:
base >=4.13 && <5 base >=4.13 && <5
@ -59,9 +59,9 @@ test-suite spec
hs-source-dirs: hs-source-dirs:
test test
default-extensions: default-extensions:
GHC2021
BlockArguments BlockArguments
OverloadedStrings OverloadedStrings
ImportQualifiedPost
ghc-options: -Wall -Wunused-packages -fdefer-typed-holes ghc-options: -Wall -Wunused-packages -fdefer-typed-holes
cpp-options: -DTEST cpp-options: -DTEST
build-tool-depends: build-tool-depends:
@ -74,4 +74,4 @@ test-suite spec
, quickcheck-instances , quickcheck-instances
, quickcheck-text , quickcheck-text
, text , text
default-language: GHC2021 default-language: Haskell2010

View file

@ -23,9 +23,9 @@ ghc-options:
- -fdefer-typed-holes - -fdefer-typed-holes
default-extensions: default-extensions:
- GHC2021
- BlockArguments - BlockArguments
- OverloadedStrings - OverloadedStrings
- ImportQualifiedPost
library: library:
source-dirs: src source-dirs: src
@ -54,5 +54,3 @@ tests:
- quickcheck-instances - quickcheck-instances
- quickcheck-text - quickcheck-text
build-tools: hspec-discover build-tools: hspec-discover
verbatim:
default-language: GHC2021

View file

@ -1,4 +1,4 @@
-- {-# LANGUAGE GHC2021 #-} {-# LANGUAGE GHC2021 #-}
module HCatSpec (spec) where module HCatSpec (spec) where