Re: [stack] Notation for typed arrays in Cat

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Apr 4, 2008, at 1:25 PM, William Tanksley, Jr wrote:

> Christopher Diggins <[email protected]> wrote:
>
>> ...
>>
>
> I think the reason you feel more comfortable with prefix is simple:
> your type notation is not a concatenative language.

I don't suppose anyone has an idea for concatenative type annotations?  
It seems like a terrible idea, but here's a first stab anyway:

    -- normal
    swap   :: A b c -> A c b
    i      :: A [A -> B] -> B
    unlist :: A {b} [A -> C] [A b {b} -> C] -> C

    -- concatenative?
    swap   :: [A b c] [A c b] 'fn
    i      :: [A [A] [B] 'fn] [B] 'fn
    unlist :: [A b 'list [A] [C] 'fn [A b b list] [C] 'fn] [C] 'fn

Well that's sort of horrible, isn't it. I don't suppose anyone has a  
magical set of type-level combinators to make this beautiful? Is it  
possible to imagine doing this without variable names?

- John
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.