title: writing ghci session in a shell script
body: <p>I am using the <a href="https://github.com/uber/queryparser" rel="nofollow noreferrer">queryparser</a> tool for parsing the queries .  I am using the stack ghci command to load the components and files of the tool into ghci,and will write the haskell commands.As soon as I use the &quot;Stack ghci&quot; it enters into an interactive mode to write the commands</p>
  <p>I want to write a shell script and automate the process, and run the commands in programmatic mode.</p>
  <p>The commands I am trying to run will be like</p>
  <blockquote>
  <p>demoTableLineage &quot;INSERT INTO foo SELECT * FROM bar&quot;
  demoJoins &quot;SELECT * FROM foo JOIN bar ON a=x AND b+c = y+z&quot;</p>
  </blockquote>
  <p>Do someone have idea to write them in a shell script and automate them in a programmatic way rather than the interactive way?</p>