Skip to content

Commit

Permalink
Try generating a license report
Browse files Browse the repository at this point in the history
  • Loading branch information
sellout committed Mar 25, 2024
1 parent 1368bea commit f576dd3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .config/project/github-ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,30 @@ in {
}
];
};
check-licenses = {
runs-on = "ubuntu-22.04";
steps = [
{uses = "actions/checkout@v4";}
{
## TODO: Uses deprecated Node.js, see haskell-actions/setup#72
uses = "haskell-actions/setup@v2";
id = "setup-haskell-cabal";
"with" = {
## NB: `cabal-plan` doesn’t yet support GHC 9.8.
ghc-version = "9.6.3";
cabal-version = pkgs.cabal-install.version;
};
}
{run = "cabal install cabal-plan -flicense-report";}
{
name = "check if licenses have changed";
run = ''
cabal-plan license-report all >docs/license-info.md
git diff --exit-code license-info.md
'';
}
];
};
};
};
}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions core/src/Yaya/Fold.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Safe #-}

Expand Down Expand Up @@ -260,6 +261,7 @@ recursiveShowsPrec' showsFPrec = flip . cata $
showString embedOperation . showString " " . showsFPrec f appPrec1

-- | An implementation of `showsPrec` for any `Recursive` instance.
#if MIN_VERSION_GLASGOW_HASKELL (8, 10, 0, 0)
--
-- >>> :{
-- recursiveShowsPrec
Expand All @@ -278,6 +280,7 @@ recursiveShowsPrec' showsFPrec = flip . cata $
-- ""
-- :}
-- "(embed (Both \"a\" (embed (Both \"b\" (embed Neither)))))"
#endif
--
-- __NB__: Use `recursiveShowsPrec'` if you need to use a custom serialization
-- function for @f@.
Expand Down
Empty file added docs/license-info.md
Empty file.

0 comments on commit f576dd3

Please sign in to comment.