[racket] at-exp with module language

From: Scott Klarenbach (scott at pointyhat.ca)
Date: Mon Jan 13 16:51:59 EST 2014

Thanks Eli.  Since I can say #lang at-exp racket/base, I assumed that if
"my-lang.rkt" exports all of racket-base that it would work.  But I suppose
that is because racket/base acts as a module language and a reader, and
that when I export it from my module language I'm missing the key
ingredient?




On Mon, Jan 13, 2014 at 1:45 PM, Eli Barzilay <eli at barzilay.org> wrote:

> Yesterday, Scott Klarenbach wrote:
> >
> > I assumed that #lang at-exp "my-lang.rkt" should work, since I'm
> > wanting to use at-exp syntax with "my-lang.rkt" semantics.  I'll
> > keep digging and I'm sure it will click.
>
> The way to think about it is that the `at-exp' language adds at
> expressions to some other (read-table-based) language -- and `at-exp
> "foo.rkt"' doesn't really have a specification of a reader.  So you
> use `sexp' to set up the base reader, then extend it with the at
> expressions.
>
>
> > Finally, as a quick pointer, is there a simple way to change #lang
> > at-exp s-exp "my-lang.rkt" into #lang my-lang?  Or if I want this,
> > do I need to implement my own reader that internally uses at-exp 's
> > read-syntax and read functions?
>
> Yes.
>
> --
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                     http://barzilay.org/                   Maze is Life!
>



-- 
Talk to you soon,

Scott Klarenbach

PointyHat Software Corp.
www.pointyhat.ca
p 604-568-4280
e scott at pointyhat.ca
200-1575 W. Georgia
Vancouver, BC V6G2V3

_______________________________________
To iterate is human; to recur, divine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140113/67e7cdda/attachment.html>

Posted on the users mailing list.