On Tue, May 27, 2014 at 12:39 PM, cwearl <notifications@github.com> wrote:

> In fulmar/type-decls.rkt:
>
> > +(require/typed fulmar/standard-chunk
> > +               [concat (Chunk * -> Chunk)]
> > +               [between (Chunk Chunk * -> Chunk)]
> > +               [between/attach (Chunk Chunk Chunk * -> Chunk)])
> > +
> > +(: between-spaces ((Listof Chunk) -> Chunk))
> > +(define (between-spaces chunks)
> > +  (apply between " " chunks))
> > +
> > +;;; GENERAL-PURPOSE STUFF ;;;
> > +;;  should go somewhere else  ;;
> > +
> > +;;; TYPE DEFINITIONS ;;;
> > +
> > +(define-type NDBoolean (U Boolean 'unspecified))
> > +(define-type C++-base-type (U C++-pointable-type Symbol))
>
> Racket allows use before definition, but I still like that constraint
> where possible. It looks like it's possible here. When I got to
> C++-pointable-type I had to search for it.
>
> My overall goal in commenting here is to ask can we reorganize these type
> defintions such that the code follows the define before use pattern.
>

In short, no. If you look closer, I believe you'll see that C++-base-type
is a mutually recursive type involving C++-pointable-type and C++-type.
There is no way to specify one first that does not refer to another yet to
be defined.