Skip to content

Conversation

mmhat
Copy link
Collaborator

@mmhat mmhat commented Feb 28, 2025

This PR includes the following changes:

  • Use more lenses in Dhall.Import and friends. My hope is that we can ultimately move to a MTL approach in Dhall.Import, i.e. use (MonadIO m, MonadState Status m) => m a instead of StateT Status IO a.

  • I moved EvaluateSettings and InputSettings to a new (internal) module Dhall.Settings. This enables us to have a field _evaluateSettings :: EvaluateSettings in Dhall.Import.Types.Status, since we need all the fields of EvaluateSettings during import resolution anyway.

  • A new HasInputSettings class similiar to HasEvaluateSettings. The functions for the different phases in the Dhall module now take a value of HasInputSettings s => s instead of InputSettings accordingly.

Simply replace the value of `_newManager` with `return manager` for
caching an already acquired `manager`.
Those settings as well as the lenses necessary to access their fields
live now in an own internal module Dhall.Settings.
This enables us to remove all fields from Dhall.Import.Status that were
in fact duplicates of the fields of EvaluateSettings.
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.

1 participant