<div dir="ltr">I'm working on a plugin, and would like to be able to tell if it's GHC or GHCi that's running.<div><br></div><div>I tried:</div><div><br></div><div>   df   <- getDynFlags</div><div>   let isGHCi = ghcMode df == CompManager</div><div><br></div><div>Alas, while that correctly tells apart "ghci" from "ghc -c", it also returns True when ghc is called without the "-c" argument.</div><div><br></div><div>Is there a better/more robust way of figuring out whether we're in an interactive session?</div><div><br></div><div>-Levent.</div></div>