curly-fn language syntax not recognized in the repl

41 views
Skip to first unread message

primer

unread,
Oct 19, 2020, 10:38:57 AM10/19/20
to Racket Users
If I run this program:

#lang curly-fn racket   
(map #{/ 1}  '(1 2 3))

I get the expected result in the repl.  But in the repl after the run, if I type:
(map #{/ 1}  '(1 2 3))

I get an error:
#%namespaced: undefined;
 cannot reference an identifier before its definition

Is there a way to make this work in the repl?

Greg Hendershott

unread,
Oct 20, 2020, 10:13:16 AM10/20/20
to Racket Users
It looks like this works neither in Dr Racket nor Racket Mode's REPLs.

From a hasty, shallow look, it seems that the curly-fn package <https://docs.racket-lang.org/curly-fn/index.html> uses a convention or protocol defined by the namespaced-transformer package <https://docs.racket-lang.org/namespaced-transformer/index.html>.

As a quick experimental hack, if I namespace-require the namespaced-transformer module before entering read-eval-print-loop -- so that the #%namespaced syntax transformer is defined -- then this does work in Racket Mode's REPL.

So I could... just add that. But I don't know the history of this. Is this a convention that Alexis proposed be adopted by Dr Racket? If so, was it not adopted simply due to lack of time, or, for technical reasons like gotchas or some other ideas about how to approach this?

Maybe someone like Alexis or Robby remembers?

Robby Findler

unread,
Oct 20, 2020, 10:16:58 AM10/20/20
to Greg Hendershott, Racket Users
I don't remember. :(

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/cbc697a3-9e82-4a4b-8f6b-6e93b6ed14dco%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages