Skip to content

Conversation

@HeinrichApfelmus
Copy link
Contributor

This pull request adds a module hierarchy at Agda2Hs.Language.Haskell that represents the Haskell language syntax from the viewpoint of Agda2Hs.

This module hierarchy essentially re-exports a subset haskell-src-exts, but also assimilates the old Agda2Hs.HsUtils module.

Comments

  • This pull request is supposed to be a pure refactoring.
  • The main purpose of this pull request is to move the codebase in a direction where we can add Haddock comments to compiled Haskell declarations, Preserve comments #114 . We follow a divide-and-conquer strategy: Before solving the problem of representing Haddock comments for Haskell declarations, we first isolate a module hierarchy Agda2Hs.Language.Haskell in which the problem and its solution are supposed to reside.
  • If Consider using ghc-source-gen #274 is implemented, then it would go through Agda2Hs.Language.Haskell as well. That said, Agda2Hs.Language.Haskell re-exports the opinion of haskell-src-exts on how Haskell code looks like — if didn't re-export the opinion, then it would present an alternate opinion, essentially duplicating haskell-src-exts. The idea is that Agda2Hs.Language.Haskell is a re-export of haskell-src-exts, but with a couple of utilities that are specific to Agda2Hs added.

@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/language-haskell branch from 07c18a5 to 0a91a73 Compare May 26, 2025 13:33
Copy link
Member

@jespercockx jespercockx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. I'm not too excited about all the extra noise of the Hs. prefixes. However it does make things more consistent, so perhaps it's fine.

@omelkonian omelkonian self-requested a review May 27, 2025 13:56
Copy link
Contributor

@omelkonian omelkonian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the file organization and more compact imports, but please revert most changes in the terms where you introduced Hs..

@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/language-haskell branch from 0a91a73 to a60b7be Compare May 28, 2025 10:43
Copy link
Contributor

@omelkonian omelkonian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@omelkonian omelkonian merged commit b3e8f3b into agda:master Jun 3, 2025
7 checks passed
@HeinrichApfelmus HeinrichApfelmus deleted the HeinrichApfelmus/language-haskell branch June 3, 2025 12:00
@jespercockx jespercockx added this to the 1.4 milestone Sep 4, 2025
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.

3 participants