Skip to content

Commit

Permalink
Format some files
Browse files Browse the repository at this point in the history
  • Loading branch information
sellout committed Mar 26, 2024
1 parent f78762c commit cb04255
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 26 deletions.
19 changes: 11 additions & 8 deletions .config/mustache.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{"project":{
"description":"Total recursion scheme library for Haskell.",
"name":"yaya",
"repo":"sellout/yaya",
"summary":"Yet another … yet another recursion scheme library for Haskell",
"version":"0.1.0.0"},
"type":{"name":"haskell"}
}
{
"project":
{
"description": "Total recursion scheme library for Haskell.",
"name": "yaya",
"repo": "sellout/yaya",
"summary": "Yet another … yet another recursion scheme library for Haskell",
"version": "0.1.0.0",
},
"type": { "name": "haskell" },
}
9 changes: 5 additions & 4 deletions .config/project/github-ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ in {
diffs="$(find . -name '*.cabal' -exec \
cabal-plan-bounds \
--dry-run \
${lib.concatMapStrings
(pkg: "--also " + pkg + " ")
self.lib.extraDependencyVersions
} \
${
lib.concatMapStrings
(pkg: "--also " + pkg + " ")
self.lib.extraDependencyVersions
} \
plans/*.json \
--cabal {} \;)"
if [[ -n "$diffs" ]]; then
Expand Down
97 changes: 83 additions & 14 deletions .config/project/hlint.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
{lib, pkgs, ...}: {
{
lib,
pkgs,
...
}: {
## Haskell linter
programs.treefmt.programs.hlint.enable = true;
## TODO: Wrap this to find our generated hlint config in the store.
project.devPackages = [pkgs.hlint];
project.file.".hlint.yaml".text = lib.generators.toYAML {} [
{group = {name = "dollar"; enabled = true;};}
{group = {name = "future"; enabled = true;};}
{group = {name = "generalise"; enabled = true;};}
{
group = {
name = "dollar";
enabled = true;
};
}
{
group = {
name = "future";
enabled = true;
};
}
{
group = {
name = "generalise";
enabled = true;
};
}

{ignore = {name = "Eta reduce";};}
{ignore = {name = "Evaluate";};}
Expand Down Expand Up @@ -39,14 +58,54 @@
"package traversable"
];
rules = [
{warn = {lhs = "forM"; rhs = "for";};}
{warn = {lhs = "forM_"; rhs = "for_";};}
{warn = {lhs = "map"; rhs = "fmap";};}
{warn = {lhs = "mapM"; rhs = "traverse";};}
{warn = {lhs = "mapM_"; rhs = "traverse_";};}
{warn = {lhs = "return"; rhs = "pure";};}
{warn = {lhs = "sequence"; rhs = "sequenceA";};}
{warn = {lhs = "sequence_"; rhs = "sequenceA_";};}
{
warn = {
lhs = "forM";
rhs = "for";
};
}
{
warn = {
lhs = "forM_";
rhs = "for_";
};
}
{
warn = {
lhs = "map";
rhs = "fmap";
};
}
{
warn = {
lhs = "mapM";
rhs = "traverse";
};
}
{
warn = {
lhs = "mapM_";
rhs = "traverse_";
};
}
{
warn = {
lhs = "return";
rhs = "pure";
};
}
{
warn = {
lhs = "sequence";
rhs = "sequenceA";
};
}
{
warn = {
lhs = "sequence_";
rhs = "sequenceA_";
};
}
];
};
}
Expand All @@ -63,8 +122,18 @@
note = "IncreasesLaziness";
};
}
{warn = {lhs = "mappend"; rhs = "(<>)";};}
{warn = {lhs = "(++)"; rhs = "(<>)";};}
{
warn = {
lhs = "mappend";
rhs = "(<>)";
};
}
{
warn = {
lhs = "(++)";
rhs = "(<>)";
};
}
];
};
}
Expand Down

0 comments on commit cb04255

Please sign in to comment.