The SDK doesn't match the IR for Decimal.divideWithDefault. This is causing issues when implementing it properly in Morphir-Scala because it doesn't match.
DivWithDefault SDK implementation that returns Decimal:
|
{-| Divide two decimals providing a default for the cases the calculation fails, such as divide by zero or overflow/underflow. |
|
-} |
|
divWithDefault : Decimal -> Decimal -> Decimal -> Decimal |
|
divWithDefault default a b = |
|
div a b |> Maybe.withDefault default |
DivWithDefault IR that returns Maybe Decimal:
|
, vSpec "divWithDefault" [ ( "default", decimalType () ), ( "a", decimalType () ), ( "b", decimalType () ) ] (maybeType () (decimalType ())) |
It should be Decimal.
The SDK doesn't match the IR for
Decimal.divideWithDefault. This is causing issues when implementing it properly in Morphir-Scala because it doesn't match.DivWithDefault SDK implementation that returns
Decimal:morphir-elm/src/Morphir/SDK/Decimal.elm
Lines 238 to 242 in cdccf45
DivWithDefault IR that returns
Maybe Decimal:morphir-elm/src/Morphir/IR/SDK/Decimal.elm
Line 49 in cdccf45
It should be
Decimal.