Hello,
I'm trying to get into the Cal and testing various of provided
features. One important is Cal support provided by Eclipse while using
Cal Eclipse plugin. The problem I'm facing is that invocation of
functions inside the console is not working at all. I mean if the
function is well defined and it should invoke well the console just
prints stack trace of following exception. The same invocation in ICE
works well of course. The most simple way how to duplicate this is for
example invoke `absInt 10' inside Cal.Core.Prelude module. The output
(at least here) is as follows:
Cal.Core.Prelude> absInt 10
Running: absInt 10
Error while executing.
org.openquark.cal.runtime.CALExecutorException$InternalException:
Unable to create instance of Cal.Core.Prelude.io_target_0_0
Caused by: java.lang.ClassCastException:
org.openquark.cal_Cal_Core_Prelude.Id cannot be cast to
org.openquark.cal.internal.runtime.lecc.RTValue, Detail:
org.openquark.cal_Cal_Core_Prelude.Id cannot be cast to
org.openquark.cal.internal.runtime.lecc.RTValue
at
org.openquark.cal.internal.machine.lecc.Executor.exec(Executor.java:
160)
at org.openquark.cal.ConsoleRunner.runTarget(ConsoleRunner.java:217)
at org.openquark.cal.ConsoleRunner.runExpression(ConsoleRunner.java:
152)
at
org.openquark.cal.eclipse.ui.console.CALConsole.handleRequest_enteredText(CALConsole.java:
420)
at org.openquark.cal.eclipse.ui.console.CALConsole.access
$300(CALConsole.java:69)
at org.openquark.cal.eclipse.ui.console.CALConsole
$InputReadJob.run(CALConsole.java:274)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassCastException:
org.openquark.cal_Cal_Core_Prelude.Id cannot be cast to
org.openquark.cal.internal.runtime.lecc.RTValue
at
org.openquark.cal.internal.machine.lecc.CALClassLoader.getStartPointInstance(CALClassLoader.java:
861)
at
org.openquark.cal.internal.machine.lecc.Executor.getInstanceOfGeneratedClass(Executor.java:
373)
at
org.openquark.cal.internal.machine.lecc.Executor.makeStartPointInstance(Executor.java:
260)
at
org.openquark.cal.internal.machine.lecc.Executor.exec(Executor.java:
158)
... 6 more
Internal runtime error.
Unable to create instance of Cal.Core.Prelude.io_target_0_0
Caused by: java.lang.ClassCastException:
org.openquark.cal_Cal_Core_Prelude.Id cannot be cast to
org.openquark.cal.internal.runtime.lecc.RTValue, Detail:
org.openquark.cal_Cal_Core_Prelude.Id cannot be cast to
org.openquark.cal.internal.runtime.lecc.RTValue
Cal.Core.Prelude>
is there any hint how to proceed in this case?
Thanks!
Karel