graphmod icon indicating copy to clipboard operation
graphmod copied to clipboard

expose Utils.hs as library

Open thma opened this issue 2 years ago • 4 comments

In a project of mine I wrote a dependency validation which builds upon your Utils.hs. As Utils is not part of the exposed-modules declaration in graphmod.cabal I had to include a verbatim copy of Utils.hs to my code base.

With this pull request Util is made part of the exposed-modules declaration. This will allow to also access Utils.hs when adding graphmod as a library dependency.

In a second commit I made Qualifier and Import instances of Eq by changing their deriving clauses. This will allow testing for equally in user code.

thanks for your very useful tool!

thma avatar Jul 29 '22 19:07 thma

Hi, thanks for the contribution! I don't mind exposing Utils, but I wonder if we should move it to Graphmod.Utils to avoid name clashes for anyone else who might be using graphmod as a library. Would you mind doing that change?

yav avatar Jul 31 '22 10:07 yav

I thought about that name clash issue as well, as quite a few libraries have some kind of 'Utils' somewhere... Yes, I'll extend my PR by renaming Utils to Graphmod.Utils

thma avatar Jul 31 '22 19:07 thma

Done !

thma avatar Jul 31 '22 19:07 thma

Hi again,

For the sake of consistency, wouldn'd it be better to also move Trie and CabalSupport to the Graphmod folder?

If you agree, I'll add that to the PR.

best regards, Thomas

thma avatar Aug 01 '22 07:08 thma

Thanks! I just merged the PR and moved the other modules as you suggested. Does it matter for you if I put a new version on Hackage, or is GitHub sufficient?

yav avatar Aug 10 '22 12:08 yav

Having a new version on Hackage would be cool (to allow even simpler integration via stack/cabal). But it's not urgent. BTW: here is the blog post on graphmod and my addon dependency checker: https://thma.github.io/posts/2022-08-07-dependency-validation-of-haskell-applications.html

thma avatar Aug 13 '22 12:08 thma