-
Notifications
You must be signed in to change notification settings - Fork 28
Add LocalTime & Maybe SDK Functions #572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- MaybeSDK.map2
- MaybeSDK.map3
- MaybeSDK.map4
- MaybeSDK.hasValue
- LocalTimeSDK.diffInHours
- LocalTimeSDK.diffInMinutes
(ctx: NativeContext) => (f: RT.Function, maybeRaw1: RT.ConstructorResult, maybeRaw2: RT.ConstructorResult) => | ||
{ | ||
val out = for { | ||
elem1 <- eitherToOption(maybeRaw1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So i was confused by the use of eitherToOption
but it turns out that is a a poorly named function. @edwardpeters can you please add appropriate docs for this function in another PR and rename it to something that actually reflects what is happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's part of this implementation that feels strange, but I'm a bit swamped to review this right now... (@michelchan , @edwardpeters , or @Paul-Folbrecht ) can any of you take a look at this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. The comments say ConstructorResult
is used for Maybes and Results, and neither are an Either
. So this should at least be renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added #575 to track this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, looks like those got mangled when they were copied from the similar Result/Either helpers. Have a PR in to fix this, currently building.
morphir/runtime/test/jvm/src/org/finos/morphir/runtime/EvaluatorMDMTests.scala
Show resolved
Hide resolved
morphir/runtime/test/jvm/src/org/finos/morphir/runtime/EvaluatorMDMTests.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with this, but would like to see #575 addressed as mentioned in the comments
(ctx: NativeContext) => (f: RT.Function, maybeRaw1: RT.ConstructorResult, maybeRaw2: RT.ConstructorResult) => | ||
{ | ||
val out = for { | ||
elem1 <- eitherToOption(maybeRaw1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added #575 to track this