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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review comments
  • Loading branch information
cocreature committed Nov 26, 2019
commit 74a62282a93054ab08a90f512de7d11682dae772
10 changes: 6 additions & 4 deletions daml-lf/spec/daml-lf-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,9 @@ First, we formally defined *well-formed types*. ::

'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ₙ) ↦ τ 

Γ ⊢ α₁ : k₁ … Γ ⊢ αₙ : kₙ
Γ ⊢ τ₁ : k₁ … Γ ⊢ τₙ : kₙ
————————————————————————————————————————————— TyTypeSynonym
Γ ⊢ S α₁ … αₙ : ⋆
Γ ⊢ S τ₁ … τₙ : ⋆
cocreature marked this conversation as resolved.
Show resolved Hide resolved



Expand Down Expand Up @@ -996,9 +996,11 @@ Then we define *well-formed expressions*. ::
——————————————————————————————————————————————————————————————— ExpEnumCon
Γ ⊢ Mod:T:Eᵢ : Mod:T

'synonym' S (α₁:k₁) … (αₙ:kₙ) ↦ τ Γ ↦ e : τ
'synonym' S (α₁:k₁) … (αₙ:kₙ) ↦ τ
Γ ⊢ τ₁ : k₁ ⋯ Γ ⊢ τₙ : kₙ
Γ ↦ e : τ[α₁ ↦ τ₁, …, α₁ ↦ τₙ]
——————————————————————————————————————————————————————————————— ExpTypeSynonym
Γ ⊢ e : Mod:S α₁ … αₙ
Γ ⊢ e : Mod:S τ₁ … τₙ

Γ ⊢ e₁ : τ₁ … Γ ⊢ eₘ : τₘ
——————————————————————————————————————————————————————————————— ExpTupleCon
Expand Down