mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
Remove property token adjustment
This commit is contained in:
parent
78ee753c7b
commit
27d72f2bff
@ -96,7 +96,6 @@ class ValuesAlgebra[S[_], Alg[_]: Monad](using
|
||||
}
|
||||
|
||||
case prop @ PropertyToken(value, properties) =>
|
||||
prop.adjust.fold(
|
||||
for {
|
||||
valueRaw <- valueToRaw(value)
|
||||
result <- valueRaw.flatTraverse(raw =>
|
||||
@ -109,7 +108,6 @@ class ValuesAlgebra[S[_], Alg[_]: Monad](using
|
||||
.value
|
||||
)
|
||||
} yield result
|
||||
)(valueToRaw)
|
||||
|
||||
case dvt @ NamedValueToken(typeName, fields) =>
|
||||
(for {
|
||||
@ -311,15 +309,14 @@ class ValuesAlgebra[S[_], Alg[_]: Monad](using
|
||||
}
|
||||
|
||||
def valueToCall(v: ValueToken[S]): Alg[Option[(ValueRaw, ArrowType)]] =
|
||||
valueToRaw(v).flatMap(
|
||||
_.flatTraverse {
|
||||
case ca: CallArrowRaw => (ca, ca.baseType).some.pure[Alg]
|
||||
valueToRaw(v).flatMap(_.flatTraverse {
|
||||
case ca: CallArrowRaw =>
|
||||
(ca, ca.baseType).some.pure[Alg]
|
||||
case apr @ ApplyPropertyRaw(_, IntoArrowRaw(_, arrowType, _)) =>
|
||||
(apr, arrowType).some.pure[Alg]
|
||||
// TODO: better error message (`raw` formatting)
|
||||
case raw => report.error(v, s"Expected arrow call, got $raw").as(none)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
def valueToTypedRaw(v: ValueToken[S], expectedType: Type): Alg[Option[ValueRaw]] =
|
||||
OptionT(valueToRaw(v))
|
||||
|
Loading…
Reference in New Issue
Block a user