command substitution in ghci?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

command substitution in ghci?

Johannes Waldmann-2
In a ghci session,
I have an IO action that returns a file name,
and then I want to  :script  that file.
(The action could also be made to return the contents.)

Cf. Bash has $(foo) to allow the output of a command
to replace the command itself. See Bash manual  3.5.4
"Command Substitution" -  $(command) and  $(< file).

We do have a work-around,
since this is being called from an elisp program.
This is just about a micro-optimisation of not calling ghci twice.

And the whole thing is a work-around for ghc and ghc-pkg
not agreeing on the use of environment files (I think)

- J.
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.