Troubles with own types in Qi
I've vainly trie开发者_JAVA百科d to get the type declaration examples working with Clozure CL, e.g. the following:
(datatype fruit
if (element? F [apples pears oranges])
______________________________________
F : fruit;)
but the only output I get is:
type error
It seems to be a problem with Ccl, is there any possibility that it runs properly?
P.S.: Type checking is turned on, (tc +)
That works for me on QiII1.06SBCL:
(0-) (tc +)
true
(1+) (datatype fruit
if (element? F [apples pears oranges])
______________________________________
F : fruit;)
fruit : symbol
(2+) apples : fruit
apples : fruit
(3+) steak : fruit
type error
So I'd suggest that you try and download one of the official bundles from the website, because, as far as I know, CCL is not officially supported at the moment.
精彩评论