[racket] fingertree / nested datatype

From: Anthony Carrico (acarrico at memebeam.org)
Date: Fri Apr 12 20:40:55 EDT 2013

On 04/11/2013 08:51 AM, Sam Tobin-Hochstadt wrote:
> Yes, an explicit struct involves an explicit indirection, and thus
> produces a regular tree.

Using Eric's example:

#lang typed/racket

(struct: (a) Indirect ((v : (Deep a))))
(struct: (a) Deep ((spine : (Indirect (List a)))))
;(struct: (a) Deep ((spine : (Deep (List a)))))

This checks fine, but try to use it:

(: test ((Deep Number) -> Boolean))
(define (test ft) (Deep? ft))

And it hangs. So maybe indirection just pushes the problem somewhere else?

-- 
Anthony Carrico

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.racket-lang.org/users/archive/attachments/20130412/5f7dff75/attachment.sig>

Posted on the users mailing list.