-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
The following error occurs when executing the CAL function below (with any argument value):
java.lang.UnsupportedOperationException: Attempt to call 'f' on:
org.openquark.cal.internal.runtime.lecc.RTData$CAL_Int, Detail: Attempt to call 'f' on: org.openquark.cal.internal.runtime.lecc.RTData$CAL_Int
test :: Int -> String;
test !unused =
let
val1 :: Int;
val1 = 0;
val2 :: Int;
val2 =
Debug.traceShowable "val2 = " $
1;
result :: String;
result =
if val2 == 0 then
// if val1 + val2 == 0 then // Same problem with this.
"abc"
else
"def";
in
Debug.traceEvalStartAndEnd "test" (
val1 `seq`
val2 `seq`
result
)
;
This is a simplified version of a function which was using seq to control the execution order due to side-effects.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels