Morgan-Stanley/morphir-elm/2.1.0

NOTE: the latest version is 3.0.0

Renamed to finos/morphir-elm. It is published under that name, and new versions come out there.

Versions published as Morgan-Stanley/morphir-elm still install under that name. 5 versions of 5 come from the new location (see their notes).

Rerouted (fork, verified). The original repository is gone. This copy comes from a fork that still has the tag. The Lamdera package server serves a copy recovered from https://github.com/maoo/morphir-elm (a fork).

What we checked: Rebuilt with git archive from commit 7391258a1c4a of https://github.com/maoo/morphir-elm (a fork) (zip prefix Morgan-Stanley-morphir-elm-fdf8b1f/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 9baff74aa05916d1b8c87fb1721afa241fc67af7.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/Morgan-Stanley/morphir-elm/zipball/2.1.0/

Morphir.IR.QName

Module to work with qualified names. A qualified name is a combination of a module path and a local name.

type QName
= QName Path Name

Type that represents a qualified name.

toTuple : QName -> ( Path, Name )

Turn a qualified name into a tuple.

Get the module path part of a qualified name.

Get the local name part of a qualified name.

Creation

fromName : Path -> Name -> QName

Creates a qualified name.

fromTuple : ( Path, Name ) -> QName

Turn a tuple into a qualified name.

String conversion

toString : (Name -> String) -> (Name -> String) -> String -> QName -> String

Turn a qualified name into a string using the specified path and name conventions.

qname =
    QName.fromTuple
        (Path.fromList
            [ Name.fromList [ "foo", "bar" ]
            , Name.fromList [ "baz" ]
            ]
        , Name.fromList [ "a", "name" ]
        )


toString Name.toTitleCase Name.toCamelCase "." qname
--> "FooBar.Baz.aName"


toString Name.toSnakeCase Name.toSnakeCase "/" qname
--> "foo_bar/baz/a_name"