-
Notifications
You must be signed in to change notification settings - Fork 205
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR advances the state of #3616. |
daml-lf/spec/daml-lf-1.rst
Outdated
@@ -846,6 +852,14 @@ First, we formally defined *well-formed types*. :: | |||
————————————————————————————————————————————— TyTuple | |||
Γ ⊢ ⟨ f₁: τ₁, …, fₙ: τₙ ⟩ : ⋆ | |||
|
|||
'synonym' S (α₁:k₁) … (αₙ:kₙ) ↦ τ ∈ 〚Ξ〛Mod | |||
(α₁:k₁) … (αₙ:kₙ) · Γ ⊢ τ : ⋆ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(α₁:k₁) … (αₙ:kₙ) · Γ ⊢ τ : ⋆ |
This line would better go in Well-formed definitions paragraph.
αₙ : kₙ · ⋯ · α₁ : k₁ ⊢ τ : ⋆
——————————————————————————————————————————————————————————————— DefSyn
⊢ 'synonym' S (α₁: k₁) … (αₙ: kₙ) ↦ τ
There was a problem hiding this 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.
daml-lf/spec/daml-lf-1.rst
Outdated
@@ -676,6 +681,7 @@ available for usage:: | |||
| 'variant' T (α₁: k₁)… (αₙ: kₙ) ↦ V₁ : τ₁ | … | Vₘ : τₘ | |||
-- DefVariant | |||
| 'enum' T ↦ E₁ | … | Eₘ -- DefEnum | |||
| 'synonym' T (α₁: k₁)… (αₙ: kₙ) ↦ τ -- DefTypeSynonym |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'synonym' T (α₁: k₁)… (αₙ: kₙ) ↦ τ -- DefTypeSynonym | |
| 'synonym' S (α₁: k₁)… (αₙ: kₙ) ↦ τ -- DefTypeSynonym |
daml-lf/spec/daml-lf-1.rst
Outdated
@@ -846,6 +852,14 @@ First, we formally defined *well-formed types*. :: | |||
————————————————————————————————————————————— TyTuple | |||
Γ ⊢ ⟨ f₁: τ₁, …, fₙ: τₙ ⟩ : ⋆ | |||
|
|||
'synonym' T (α₁:k₁) … (αₙ:kₙ) ↦ τ ∈ 〚Ξ〛Mod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'synonym' T (α₁:k₁) … (αₙ:kₙ) ↦ τ ∈ 〚Ξ〛Mod | |
'synonym' S (α₁:k₁) … (αₙ:kₙ) ↦ τ ∈ 〚Ξ〛Mod |
166c340
to
dfc3adf
Compare
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tags, if appropriateNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.