Stream: beginners

Topic: Loading definitions into the repl


view this post on Zulip Isaac Van Doren (May 04 2023 at 02:14):

Is there a way to load definitions into the repl from a file? Like in the Haskell repl where you can do ghci> :load myFile.hs

view this post on Zulip Brendan Hansknecht (May 04 2023 at 02:24):

I am pretty sure we don't have that yet

view this post on Zulip Anton (May 05 2023 at 08:32):

It does seem like a good feature, I'll make an issue unless anyone objects.

view this post on Zulip Anton (May 05 2023 at 08:33):

@Isaac Van Doren as a temporary workaround I do think you can copy and paste the contents of the file.

view this post on Zulip Richard Feldman (May 05 2023 at 11:15):

in Elm, this Just Works automatically when you load up the repl (based on the directory you're in)

view this post on Zulip Richard Feldman (May 05 2023 at 11:16):

so the Roc equivalent would be that when you open the repl we load main.roc (and would accept a CLI arg to specify a different .roc file) and then make everything importable according to what main.roc specifies


Last updated: Jul 05 2025 at 12:14 UTC