Morgan-Stanley/morphir-elm/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 (renamed, needs approval). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/finos/morphir-elm.

What we checked: The repo moved to github.com/finos/morphir-elm and tag 3.0.0 is there; its commit 5fb93bcdc077 is from 2020-10-29 14:07 UTC, after the version was published (2020-08-17 21:31 UTC); elm.json differs from package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one and nothing else confirms its contents.

We could not verify this copy against what was published, so the Lamdera compiler asks before using it (y/n). Without a terminal, as in CI, it stops with an error unless approved:

  • lamdera make --auto-approve-package-rerouting approves rerouted versions for that run,
  • LAMDERA_AUTO_APPROVE_PACKAGE_REROUTING=1 does the same for every run in that environment,
  • LAMDERA_CACHE=off skips the Lamdera package server altogether: packages come from package.elm-lang.org and GitHub only, as with elm, and a rerouted version then fails to download.

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

Morphir.IR.AccessControlled

Module to manage access to a node in the IR. This is only used to declare access levels not to enforce them. Enforcement can be done through the helper functions withPublicAccess and withPrivateAccess but it's up to the consumer of the API to call the righ function.

type alias AccessControlled a =
{ access : Access
, value : a
}

Type that represents different access levels.

type Access
= Public
| Private

Public or private access.

Creation

public : a -> AccessControlled a

Mark a node as public access. Actors with both public and private access are allowed to see.

private : a -> AccessControlled a

Mark a node as private access. Only actors with private access level can see.

Query

withPublicAccess : AccessControlled a -> Maybe a

Get the value with public access level. Will return Nothing if the value is private.

withPublicAccess (public 13) -- Just 13


withPublicAccess (private 13) -- Nothing
withPrivateAccess : AccessControlled a -> a

Get the value with private access level. Will always return the value.

withPrivateAccess (public 13) -- 13


withPrivateAccess (private 13) -- 13

Transform

map : (a -> b) -> AccessControlled a -> AccessControlled b

Apply a function to the access controlled value but keep the access unchanged.