ghci, running :load on filename provided by variable
How do I load a file in ghci where the filename comes from a variable? So like, let f = "myfile.hs" :load f D
I'm not sure that you can, is there any particular reason to not make the file a module and use import? -Chris Dennis Raddle writes:
How do I load a file in ghci where the filename comes from a variable?
So like, let f = "myfile.hs" :load f
D _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- Best, Chris
Check out the :def command.
On Jan 24, 2017 2:34 PM, "Dennis Raddle"
How do I load a file in ghci where the filename comes from a variable?
So like, let f = "myfile.hs" :load f
D
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (3)
-
Christopher Sasarak -
Dennis Raddle -
Evan Laforge