Decorations #136
Replies: 5 comments 5 replies
-
As we were discussing potential solutions we realized that it would worth further clarifying what "a given node" means in story 2. Based on the description it might sound like you can take a type or a value, pass it to some tool or function and get the decorations back. But since types and values in the Morphir IR are referentially transparent, that would mean that you cannot assign different decorations to the same type even if it's used in different parts of the model. So when decorating types and values we need to use an identifier that refers to the location of the type or value within the IR, such as a fully-qualified name. Since this was a bit abstract let me represent with an example: type Tide = High | Low
type Volume = High | Low The type here is Not sure if we want to change the story itself to reflect this or add it as a note, but I think it's important to clarify to avoid any confusion. |
Beta Was this translation helpful? Give feedback.
-
Could we add:
|
Beta Was this translation helpful? Give feedback.
-
New Decorations Proposal created. |
Beta Was this translation helpful? Give feedback.
-
Requesting:
|
Beta Was this translation helpful? Give feedback.
-
I think this example of the above from smithy might help: https://smithy.io/2.0/spec/model.html#merging-models |
Beta Was this translation helpful? Give feedback.
-
Decorations Intro
The Morphir project has had many requires for the ability to annotate specific items in a Morphir model with information beyond that provided by the IR. Many languages feature such a capability through mechanisms like annotations or decorations. This discussion seeks to collect the set of feature requirements for adding decorations to Morphir. To start we, have collected the following features from the various requests:
User Stories
Resulting Questions
The list of users leads to the following questions that must be answered by any proposal:
Once this set of requirements is signed off, we'll submit a proposed specification and solution.
Beta Was this translation helpful? Give feedback.
All reactions