Formerly Morgan-Stanley/morphir-elm. Search finds this package by either name.
Morphir is a multi-language system built on a data format that captures an application's domain model and business logic in a technology agnostic manner. This repo contains tools that allow you to write your business logic in Elm, parse it into Morphir IR and transpile it to other languages like Scala or visualize it to your business users using Elm.
We publish it both as an NPM and an Elm package:
elm/core support.The morphir-elm NPM package provides a CLI to run the tooling.
npm install -g morphir-elmAll the features can be accessed through sub-commands within the morphir-elm command:
morphir-elm [command]Each command has different options which are detailed below:
This command reads Elm sources, translates to Morphir IR and outputs the IR into JSON.
morphir-elm make [options]Important: The command requires a configuration file called morphir.json located in the project
root directory with the following structure:
{
"name": "My.Package",
"sourceDirectory": "src",
"exposedModules": [
"Foo",
"Bar"
]
}My.Package all your module files should either be directly
under that or in submodules.Foo refers to the Elm module My.Package.Foo.--project-dir <path>, -p--output <path>, -oThis command reads the JSON produced by morphir-elm make and generates Scala sources into the specified folder:
morphir-elm gen [options]--input <path>, -i--output <path>, -o./dist.The finos/morphir-elm package provides various tools to work with Morphir. It contains the following main components:
elm install finos/morphir-elmThe goal of the Morphir.SDK module is to provide you the basic building blocks to build your domain model and
business logic. It also serves as a specification for backend developers that describes the minimum set of functionality
each backend implementation should support.
It is generally based on elm/core/1.0.5 and provides most of
the functionality provided there except for some modules that fall outside the scope of business knowledge modeling:
Debug, Platform, Process and Task.
Apart from the modules mentioned above you can use everything that's available in elm/core/1.0.5 without importing
the Morphir SDK. The Elm frontend will simply map those to the corresponding type/function names in the Morphir SDK.
The Morphir SDK also provides some features beyond elm/core/1.0.5. To use those features you have to import the
specific Morphir SDK module.
The Morphir.IR module defines a type-safe API to work with Morphir's intermediate representation. The module
structure follows the structure of the IR. Here's a list of concepts in a top-down approach:
git checkout -b feature/fooBar)git commit -am 'Add some fooBar')git push origin feature/fooBar)NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool. Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
Need an ICLA? Unsure if you are covered under an existing CCLA? Email [email protected]
Copyright 2014 Morgan Stanley
Distributed under the Apache License, Version 2.0.
SPDX-License-Identifier: Apache-2.0