Re: [stack] possibilities for macros in a typed language

"Christopher Diggins" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
> > In Cat "dup apply" has the type "(A (A (B -> C) -> D) -> D)"
>
> I'm not convinced this is useful. As a trivial example, it assigns
> '[swap] dup apply' the type 'A b -> A (C -> D) b'. Your system then
> rejects this type because (C -> D) is unknowable.

You are incorrect.
Cat infers the type as: ('a -> ('b 'c -> 'c 'b) 'a)
Why would you claim otherwise?

> > Type-checking is usually done after macro expansion.
>
> I was speaking here primarily from a pedagogical standpoint. With
> macros, you can no longer state that every space-delineated token is a
> function.

This is already not the case in Joy or Cat. (e.g. in Cat "define",
"[", "]", "{", "}").

- Christopher
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.