title: Using `runhaskell` with command-line arguments
body: <p>I have a file named <code>&quot;test.txt&quot;</code> with this text:</p>
  <pre><code>Good
  Morning
  Sir
  </code></pre>
  <p>and a file named <code>&quot;test.hs&quot;</code> with the following code:</p>
  <pre><code>module Main where
  
  import System.IO
  
  main :: IO ()
  main = interact f
  
  f :: String -&gt; String
  f s = head $ lines s
  </code></pre>
  <p>The following command...</p>
  <p><code>cat test.txt | runhaskell test.hs</code></p>
  <p>outputs</p>
  <p><code>Good</code></p>
  <hr />
  <p>However, I would like to explicitly pass parameters to <code>runhaskell</code> without relying on a file, like:</p>
  <p><code>echo &quot;Good\nMorning\nSir&quot; | runhaskell test.hs</code></p>
  <p>and also execute <code>runhaskell</code> with a literal string of Haskell code, like:</p>
  <p><code>echo &quot;Good\nMorning\nSir&quot; | runhaskell &quot;module Main where\nimport System.IO\nmain :: IO ()\nmain = interact f\nf :: String -&gt; String\nf s = head $ lines s&quot;</code></p>
  <p>Is this technically possible ?</p>