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

Compile 2ADT to NADT and NADT to CCC #22

Merged
merged 4 commits into from
Mar 18, 2024
Merged

Conversation

ibbem
Copy link
Collaborator

@ibbem ibbem commented Mar 14, 2024

2ADT to NADT is finished except for a little cleanup, mostly imports.
NADT to CCC does work. However, it currently requires a TERMINATING pragma. I can think of the following solutions:

  • Introduce sized types into the framework constructors.
  • Specialize 2ADT und NADT for one variant type. It's only intuition but I think SingleConstructorLanguage already represents an isomorphism.
  • Ignore the issue and keep the TERMINATING pragma.

@@ -15,7 +15,7 @@ open import Construct.GrulerArtifacts
open import Construct.Choices

data NADT : Size → 𝔼 where
NADTAsset : ∀ {i A} → Leaf (V A) → NADT i A
NADTAsset : ∀ {i A} → Leaf (V A) → NADT (↑ i) A
NADTChoice : ∀ {i A} → VLChoice.Syntax F (NADT i) A → NADT (↑ i) A
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if it would be nicer to inline the constructs here, too, just as we did for 2ADT. But don't bother for now to change this and adapt all proofs. We can leave as is for now.

Copy link
Member

Choose a reason for hiding this comment

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

Also, good catch with the here!

src/Lang/CCC.lagda.md Show resolved Hide resolved
@ibbem ibbem force-pushed the 2ADT-to-NADT-to-CCC branch from 1c594c4 to 26a4e13 Compare March 17, 2024 17:33
@ibbem ibbem requested a review from pmbittner March 17, 2024 17:38
@pmbittner pmbittner added the enhancement New feature or request label Mar 18, 2024
@pmbittner pmbittner merged commit 019e675 into develop Mar 18, 2024
1 check passed
@ibbem ibbem deleted the 2ADT-to-NADT-to-CCC branch April 6, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants