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

Unique dependencies in dot graph #713

Merged
merged 3 commits into from
Nov 26, 2018

Conversation

basile-henry
Copy link
Collaborator

Sometimes the same import is used multiple times in a given dhall file. This just adds extra noise in the generated graph.

For example here:

https://github.com/dhall-lang/dhall-to-cabal/blob/8967220bd3618c876bbc4f7b0c93d49fa47a30ee/dhall/unconditional.dhall#L21-L26

2018-11-26-152926_1196x79_scrot

It results in 4 connections between two nodes where 1 would be enough.

By making the generated graph strict we prune away all the redundant connection making the graph more readable.

With dhall-to-cabal as a real world example:

Before this PR:

old-dhall-to-cabal

After this PR:

new-dhall-to-cabal

@basile-henry basile-henry merged commit 65f5377 into dhall-lang:master Nov 26, 2018
@basile-henry basile-henry deleted the basile/dependency-dot branch November 26, 2018 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants