title: Haskell this file's path
body: <p>Is there a way to get the path of the file where the function is defined?</p>
  
  <p>For example:</p>
  
  <pre><code>rootappdir
  |- Foo.hs
  |- Bar.hs
  
  
  module Foo where
  
  getThisDir :: IO Filepath
  getThisDir = ...
  
  prelude&gt; getThisDir
  absolute/path/to/rootappdir/Foo.hs
  </code></pre>
  
  <p>If it is possible with an even simpler function :: Filepath, that's even better.
  Maybe we would need to use the preprocessor?</p>