<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 18 Jan 2008, at 2:00 PM, Clifford Beshers wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">2008/1/18 Sukit Tretriluxana &lt;<a href="mailto:tretriluxana.s@gmail.com">tretriluxana.s@gmail.com</a>&gt;:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi,<br><br>I don't know if it's been asked before. I just wonder if GHC supports some sort of one-liner program that can be specify right as the argument to either ghci or runghc program. In perl, they have something like <br><br>perl <b>-e</b> 'print "Hello"'<br><br>Do we have similar thing with GHC?</blockquote><div><br><br> ghc -e 'putStrLn "Yes, we do."'</div></div></blockquote><br></div><div>Although, unlike perl, you don't have to say print explicitly if you don't need it:</div><div><br class="webkit-block-placeholder"></div><div>ghc -e '"This works great!"'</div><div><br class="webkit-block-placeholder"></div><div>jcc</div><div><br class="webkit-block-placeholder"></div><br></body></html>