Skip to content

Conversation

mmhat
Copy link
Collaborator

@mmhat mmhat commented Dec 7, 2024

This PR improves recompilation checking for modules that use the Dhall.TH.staticDhallExpression function and the Dhall.TH.dhall Quasi Quoter. Specifically, we call Language.Haskell.TH.addDependentFile for each local import appearing in a Dhall expression: By doing that GHC will rebuild the module splicing in that expression if one of its local imports changes.

In order to collect the imports that where processed in the import resolution phase a new function resolveAndStatusWithSettings was added to the Dhall module. This function also returns the final import status (Dhall.Import.Status) together with the resolved expression.

Fixes #2518

mmhat and others added 3 commits December 7, 2024 08:11
@Gabriella439 Gabriella439 merged commit e9f37ae into dhall-lang:main Dec 20, 2024
9 checks passed
@mmhat mmhat deleted the 2518-th-add-dependent-file branch December 22, 2024 16:42
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 1, 2025
1.42.2

* [Supports standard version 23.1.0](https://github.com/dhall-lang/dhall-lang/releases/tag/v23.1.0)
  * [Allow `Natural` and `Integer` literals in binary notation](dhall-lang/dhall-haskell#2540)
* Fix macOS build [[#2561](dhall-lang/dhall-haskell#2561)] / [[#2586](dhall-lang/dhall-haskell#2586)]
* [`dhall to-directory-tree`: Fix support for empty `Map`s](dhall-lang/dhall-haskell#2609)
* [`Dhall.TH`: Improve recompilation checking](dhall-lang/dhall-haskell#2620)
  * `Dhall.TH` utilities now use `addDependentFile` internally so that GHC will recompile if any Dhall dependencies change
* Performance improvements
  * Optimize `Natural/fold`: [[#2585](dhall-lang/dhall-haskell#2585)] / [[#2596](dhall-lang/dhall-haskell#2596)]
  * [Improve `Dhall.Map.traverseWithKey` performance](dhall-lang/dhall-haskell#2589)
    * The fold will now short-circuit if it reaches a fixed point
  * [#2611](dhall-lang/dhall-haskell#2611)
* Fixes and improvements to test suite
  * [#2593](dhall-lang/dhall-haskell#2593)
* Fixes and improvements to haddocks
  * [#2546](dhall-lang/dhall-haskell#2546)
* Fixes and improvements to code formatting
  * [#2608](dhall-lang/dhall-haskell#2608)
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.

Dhall.TH functions should call addDependentFile
2 participants