title: SweetJS : Write a macro for a specific library
body: <p>I'm currently working on a little project which consists about writing macros for Ramda. Here is an example :</p>
  
  <pre><code>let map = macro {
      rule { $f $array } =&gt; { R.map($f, $array) }
      rule { $f } =&gt; { R.map($f) }
  }
  </code></pre>
  
  <p>I tried to compile this simple sample of code as a beginning :</p>
  
  <pre><code>var R = require('ramda');
  
  function log (value) {
      console.log(value);
  }
  
  map log [1, 2, 3];
  </code></pre>
  
  <p>Because of hygiene, the compiled code looks like this :</p>
  
  <pre><code>var R$759 = require('ramda');
  function log$761(value$762) {
      console.log(value$762);
  }                   
  R.map(log$761)[1, 2, 3];
  </code></pre>
  
  <p>My problem is that I don't know how to make reference to ramda.</p>
  
  <p>Has anyone tried to write macros for a specific library and encountered this problem ?</p>