Re: [stack] typing higher-order concatenative languages with standard hindley-milner

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On May 31, 2008, at 1:36 AM, Christopher Diggins wrote:

> It can't infer much,

The system, as I am using it below, seems to do very well. Keep in  
mind that he's using it for an imperative forth-like language. We're  
using it for a functional Cat-like language. If you have an example of  
something Cat can infer using a combination of the functions below  
that the Haskell version cannot (ignoring self types), please put it  
forward. Otherwise, I'll have to waste my time finding the problems  
myself. :)

> and as Okasaki points out the whole system
> doesn't work in practice for even tiny non-trivial programs.

The efficiency issues, as far as I can tell, are only due to  
'begindef' and friends which are necessary to allow the postfix  
syntax. If you had a built-in postfix syntax, that becomes non-issue.  
The huge size of the types is, again, a purely syntactic issue.  
There's no reason they can't be rendered exactly the same as Cat's  
types, albeit without the need for rows. You just need to use the  
space as a left-associative pairing operator.

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