good first issuehelp wantedir-simplification
倉庫指標
- 星標
- (51 顆星)
- PR 合併指標
- (平均合併 3小時 4分鐘) (30 天內合併 2 個 PR)
描述
Currently there are two separate constructors for Record and ExtensibleRecord in the IR:
https://github.com/finos/morphir-elm/blob/55f27570f971e8c4e12fe1a0346dffdce594869e/src/Morphir/IR/Type.elm#L89-L90
These correspond to the following Elm code (excluding the left-hand-side):
type alias MyRecord =
{ foo : String
}
type alias MyExtensibleRecord e =
{ e
| foo : String
}
The structure and semantics of the two definitions are very similar and in most cases the code that operates on them will share most of the logic so merging them will make the IR smaller and easier to process. This is one way to represent both with a single constructor:
| Record a (Maybe Name) (List (Field a))
Acceptance Criteria
- The
ExtensibleRecordconstructor should be merged into theRecordconstructor as described above. https://github.com/finos/morphir-elm/blob/bc598079dd1d618ab6dfb5cb6116b215b323cfd7/src/Morphir/IR/Type.elm#L200-L201 - All usages across the codebase should be changed to use the new constructor.
-
npm run buildshould complete successfully. -
elm-testshould complete successfully.