Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Use GHC2024 and GHC 9.10 #145

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 2 additions & 35 deletions haskell-template.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,50 +34,17 @@ common shared
relude

default-extensions:
BangPatterns
ConstraintKinds
DataKinds
DeriveDataTypeable
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
DerivingStrategies
DerivingVia
EmptyCase
EmptyDataDecls
EmptyDataDeriving
ExistentialQuantification
ExplicitForAll
FlexibleContexts
FlexibleInstances
GADTSyntax
GeneralisedNewtypeDeriving
ImportQualifiedPost
KindSignatures
LambdaCase
MultiParamTypeClasses
MultiWayIf
NoStarIsType
NumericUnderscores
OverloadedStrings
PolyKinds
PostfixOperators
RankNTypes
ScopedTypeVariables
StandaloneDeriving
StandaloneKindSignatures
TupleSections
TypeApplications
TypeFamilies
TypeOperators
ViewPatterns

build-depends:
, aeson
, async
, base >=4 && <5
, base
, data-default
, directory
, filepath
Expand All @@ -90,7 +57,7 @@ common shared
, with-utf8

hs-source-dirs: src
default-language: Haskell2010
default-language: GHC2024

executable haskell-template
import: shared
Expand Down
4 changes: 2 additions & 2 deletions nix/modules/flake-parts/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
];
});

# The base package set (this value is the default)
# basePackages = pkgs.haskellPackages;
# The base package set (where you set compiler version)
basePackages = pkgs.haskell.packages.ghc910;

# Packages to add on top of `basePackages`
packages = {
Expand Down
25 changes: 14 additions & 11 deletions nix/modules/flake-parts/pre-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(inputs.git-hooks + /flake-module.nix)
inputs.fourmolu-nix.flakeModule
];
perSystem = { config, ... }: {
perSystem = { config, pkgs, ... }: {
pre-commit.settings = {
hooks = {
nixpkgs-fmt.enable = true;
Expand All @@ -17,16 +17,19 @@
};
};

fourmolu.settings = {
indentation = 2;
comma-style = "leading";
record-brace-space = true;
indent-wheres = true;
import-export-style = "diff-friendly";
respectful = true;
haddock-style = "multi-line";
newlines-between-decls = 1;
extensions = [ "ImportQualifiedPost" ];
fourmolu = {
package = pkgs.haskellPackages.fourmolu_0_16_2_0;
settings = {
indentation = 2;
comma-style = "leading";
record-brace-space = true;
indent-wheres = true;
import-export-style = "diff-friendly";
respectful = true;
haddock-style = "multi-line";
newlines-between-decls = 1;
extensions = [ "ImportQualifiedPost" ];
};
};
};
}
Loading