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

Add specification for type synonyms in DAML-LF #3635

Merged
merged 5 commits into from
Nov 26, 2019
Merged

Conversation

cocreature
Copy link
Contributor

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags, if appropriate
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

Copy link
Collaborator

@remyhaemmerle-da remyhaemmerle-da left a comment

Choose a reason for hiding this comment

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

LGTM

@remyhaemmerle-da
Copy link
Collaborator

This PR advances the state of #3616.

@@ -846,6 +852,14 @@ First, we formally defined *well-formed types*. ::
————————————————————————————————————————————— TyTuple
Γ ⊢ ⟨ f₁: τ₁, …, fₙ: τₙ ⟩ : ⋆

'synonym' S (α₁:k₁) … (αₙ:kₙ) ↦ τ ∈ 〚Ξ〛Mod
(α₁:k₁) … (αₙ:kₙ) · Γ ⊢ τ : ⋆
Copy link
Collaborator

@remyhaemmerle-da remyhaemmerle-da Nov 26, 2019

Choose a reason for hiding this comment

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

Suggested change
(α₁:k₁) … (αₙ:kₙ) · Γ ⊢ τ : ⋆

This line would better go in Well-formed definitions paragraph.

    αₙ : kₙ · ⋯ · α₁ : k₁  ⊢  τ  :  ⋆
  ——————————————————————————————————————————————————————————————— DefSyn
    ⊢  'synonym' S (α₁: k₁) … (αₙ: kₙ) ↦ τ 

daml-lf/spec/daml-lf-1.rst Show resolved Hide resolved
Copy link
Contributor

@hurryabit hurryabit left a comment

Choose a reason for hiding this comment

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

Very nice. Thank you.

I agree with @remyhaemmerle-da on the well-formed definitions section.

@@ -676,6 +681,7 @@ available for usage::
| 'variant' T (α₁: k₁)… (αₙ: kₙ) ↦ V₁ : τ₁ | … | Vₘ : τₘ
-- DefVariant
| 'enum' T ↦ E₁ | … | Eₘ -- DefEnum
| 'synonym' T (α₁: k₁)… (αₙ: kₙ) ↦ τ -- DefTypeSynonym
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| 'synonym' T (α₁: k₁)… (αₙ: kₙ) ↦ τ -- DefTypeSynonym
| 'synonym' S (α₁: k₁)… (αₙ: kₙ) ↦ τ -- DefTypeSynonym

@@ -846,6 +852,14 @@ First, we formally defined *well-formed types*. ::
————————————————————————————————————————————— TyTuple
Γ ⊢ ⟨ f₁: τ₁, …, fₙ: τₙ ⟩ : ⋆

'synonym' T (α₁:k₁) … (αₙ:kₙ) ↦ τ ∈ 〚Ξ〛Mod
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'synonym' T (α₁:k₁) … (αₙ:kₙ) ↦ τ ∈ 〚Ξ〛Mod
'synonym' S (α₁:k₁) … (αₙ:kₙ) ↦ τ ∈ 〚Ξ〛Mod

@mergify mergify bot merged commit f402acf into master Nov 26, 2019
@mergify mergify bot deleted the lf-synonym-docs branch November 26, 2019 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants