-
Notifications
You must be signed in to change notification settings - Fork 220
Split Dhall.Syntax #2449
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
Merged
Merged
Split Dhall.Syntax #2449
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Moved functions and optics to Dhall.Syntax.Operations - Moved types to Dhall.Syntax.Types - Moved instances for the following classes to own modules in Dhall.Syntax.Instances: - Applicative - Bifunctor - Data - Eq - Foldable - Functor - Lift - Monad - Monoid - NFData - Ord - Pretty - Semigroup - Show - Traversable Only the following instances are in Dhall.Syntax.Types: Generic, IsString, Bounded, Enum - Monad Expr is using Monad Applicative and not the other way round
- Expr lives in Dhall.Syntax.Expr - Import and friends live in Dhall.Syntax.Import - Const lives in Dhall.Syntax.Const - Var lives in Dhall.Syntax.Var
8f24cb9
to
ccffe7f
Compare
Gabriella439
approved these changes
Sep 19, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I think the breaking change is fine
Feel free to merge once tests pass
sjakobi
added a commit
that referenced
this pull request
Sep 29, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR splits
Dhall.Syntax
into several smaller modules to mitigate the effect of https://gitlab.haskell.org/ghc/ghc/-/issues/5642 and https://gitlab.haskell.org/ghc/ghc/-/issues/5642 - namely the excessive space usage at built time caused by theGeneric
instance ofDhall.Syntax.Expr
. Most datatypes fromDhall.Syntax
were moved to own modules in theDhall.Syntax
namespace and the derivation/declaration of type class instances for the datatypes were grouped in modules belowDhall.Syntax.Instances
. Everything from the new modules gets re-exported byDhall.Syntax
and are internal to thedhall
package; Nothing should change from a users point of view.The memory consumed during a run of
cabal build dhall
drops from ~1200 MB to ~800 MB and the build time decreases slightly.I also removed the superfluous
PreferFromWith
data constructor which simplifies thePreferAnnotation
type. Note that this is a breaking change.Fixes #2313