Some further investigation:
The 'CAL Console' menu item (which I'd never noticed before) does
faikl for me, but differently:
Cal.Core.Prelude>1 :: Int
Running: 1 :: Int
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, Detail:
org.openquark.cal_Cal_Core_Prelude.Id
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:55)
Caused by: java.lang.ClassCastException:
org.openquark.cal_Cal_Core_Prelude.Id
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, Detail:
org.openquark.cal_Cal_Core_Prelude.Id
The expression 1 :: Int evaluates correctly when I start ICE via a
'Run Configuration'. Note that just 1 is ambiguous -- you need to
specify exactly which type a constant is, if there is no way that CAL
can infer it.
Tom
Tom