Stream: beginners

Topic: Specifying platform in REPL


view this post on Zulip Krzysztof Kielak (May 13 2024 at 10:51):

Hi! I'm new to Roc and just going through the tutorial and I've been wondering if it's possible to "recreate" the context of the platform (e.g. cli) while in REPL.

I'm thinking of doing this either:

Thanks in advance!
Chris

view this post on Zulip Anton (May 13 2024 at 11:50):

Hi @Krzysztof Kielak,
The REPL is not my area of expertise but it looks like you could modify the lines here to e.g use the basic-cli platform instead.

view this post on Zulip Brendan Hansknecht (May 13 2024 at 12:18):

I don't think that is possible. I mean maybe you could hack the compiler to do it, but I don't think it would work (would fail to link/load).

view this post on Zulip Brendan Hansknecht (May 13 2024 at 12:18):

Repl is really just made for pure code currently

view this post on Zulip Luke Boswell (May 13 2024 at 12:48):

Interesting.. I read that as like a platform or domain specific REPL. Is that a thing elsewhere? Maybe we could have platforms that provide REPL envrionment??

view this post on Zulip Krzysztof Kielak (May 13 2024 at 14:09):

@Luke Boswell that exactly what I was actually trying to achieve to have the cli platform form say Http module available at the REPL, so I could experiment with values reported from the web without the need for the edit/compile/run cycle


Last updated: Jul 05 2025 at 12:14 UTC