Hi Evan,

I don't think you can apply this patch as is, there will be just too
many warning messages by the scrutinizer.

Declaring a function like this:
(: foo ((* -> *) -> *))
doesn't say foo doesn't care what the passed function takes as argument.
It says that function must take _everything_ thrown at it.
If you don't care about what the argument is you should quantify it:
(: foo (forall (a) ((a -> *) -> *)))

One reason for warnings is this line in call-result:
(xptype `(procedure ,(make-list nargs '*) *))
I think this is just used to check that the argument count of the call
is compatible with the function's signature. Changing the '* to
'noreturn works here, but is a bit of a hack. You could also use forall
and generate new variables.

Another reason for warnings is the types.db. For example:
(chicken.sort#sorted? (#(procedure #:enforce) chicken.sort#sorted? ((or
list vector) (procedure (* *) *)) boolean))

It's not enough LESS? works for elements in the sequence, it must also
work for everything else.

A more lightweight forall syntax could help. Maybe ML style would work
(: foo (('a 'b -> *) -> *))
This would be translated into:
(: foo (forall (a b) ((a b -> *) -> *)))

Even if you use forall there's a risk the type will go through resolve,
which will resolve all non-unified type variables into '*.


Evan Hanson <ev...@foldling.org> writes:

> Hi megane,
>
> I just wanted to let you know this hasn't fallen off the map -- I'm
> hoping to look into this next week.
>
> Thanks for your patience,
>
> Evan

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to