What's New in Version 3
What’s New in Version 3
Version 3 of the Morphir IR schema introduces consistent capitalization across all tags, providing a uniform and predictable format.
Key Changes from Version 2
Consistent Capitalization
The primary change in version 3 is the complete capitalization of all tags throughout the schema:
Value Expression Tags
All value expression tags are now capitalized:
"apply"→"Apply""lambda"→"Lambda""let_definition"→"LetDefinition""if_then_else"→"IfThenElse""pattern_match"→"PatternMatch""literal"→"Literal""variable"→"Variable""reference"→"Reference""constructor"→"Constructor""tuple"→"Tuple""list"→"List""record"→"Record""field"→"Field""field_function"→"FieldFunction""let_recursion"→"LetRecursion""destructure"→"Destructure""update_record"→"UpdateRecord""unit"→"Unit"
Pattern Tags
All pattern tags are now capitalized:
"wildcard_pattern"→"WildcardPattern""as_pattern"→"AsPattern""tuple_pattern"→"TuplePattern""constructor_pattern"→"ConstructorPattern""empty_list_pattern"→"EmptyListPattern""head_tail_pattern"→"HeadTailPattern""literal_pattern"→"LiteralPattern""unit_pattern"→"UnitPattern"
Literal Tags
All literal tags are now capitalized:
"bool_literal"→"BoolLiteral""char_literal"→"CharLiteral""string_literal"→"StringLiteral""whole_number_literal"→"WholeNumberLiteral""float_literal"→"FloatLiteral""decimal_literal"→"DecimalLiteral"
Benefits
Consistency
Version 3 provides a single, uniform naming convention across the entire IR structure. This makes the schema:
- Easier to remember: One rule applies everywhere
- More predictable: All tags follow PascalCase capitalization
- Cleaner to work with: No need to remember which tags use underscores or lowercase
Better Tooling Support
The consistent capitalization improves:
- Code generation: Automated tools can rely on uniform naming
- Serialization/Deserialization: Simplified mapping to programming language types
- Validation: Easier to write validation rules and tests
Migration from Version 2
Migrating from version 2 to version 3 requires updating all lowercase and underscore-separated tags:
- Capitalize all value tags
- Capitalize all pattern tags
- Capitalize all literal tags
- Remove underscores and use PascalCase
Recommendation
Version 3 is the current and recommended format for all new Morphir IR files. It provides the best balance of consistency, clarity, and tooling support.
See Also
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.