title: Why does compiler identify two equivalent signatures with different names of generic type variables as different types?
body: <p><strong>Question</strong></p>
  
  <p>Why are</p>
  
  <pre><code>val of_bindings : (key * '_a) list -&gt; '_a t
  val of_bindings : (key * 'a) list -&gt; 'a t
  </code></pre>
  
  <p>different signatures?</p>
  
  <p><strong>Context</strong></p>
  
  <p>I have some Map extension implementation:</p>
  
  <p><strong>MAPEXT.ml   :</strong></p>
  
  <pre><code>module type T = sig
      include Map.S    
      val of_bindings : (key * 'a) list -&gt; 'a t
    end 
  </code></pre>
  
  <p><strong>mapExt.mli  :</strong></p>
  
  <pre><code>module Make (Key : Map.OrderedType)
       : MAPEXT.T with type key = Key.t
  </code></pre>
  
  <p><strong>mapExt.ml   :</strong></p>
  
  <pre><code>module Make (Key : Map.OrderedType) = struct
      include Map.Make (Key)
      let of_bindings =
        let rec of_bindings acc =
          function | (k, v) :: t -&gt; of_bindings (add k v acc) t
                   | []          -&gt; acc in
        of_bindings empty
    end
  </code></pre>
  
  <p>Compiler gave me an error as a result of
  <code>ocamlopt -c MAPEXT.ml mapExt.mli mapExt.ml</code></p>
  
  <blockquote>
    <p>Error: The implementation mapExt.ml does not match the interface
    mapExt.cmi:
           ...
          At position module Make(Key) : 
           Values do not match:
           <strong>val of_bindings : (key * '_a) list -> '_a t</strong>
         is not included in
           <strong>val of_bindings : (key * 'a) list -> 'a t</strong>
         File "mapExt.ml"</p>
  </blockquote>
  
  <p>I thought the name of generic type variable is not important, just for signalling a different type. But from what I see now they seem to have different meanings. </p>
  
  <p>How to avoid this problem to compile this code?</p>
  
  <p>Related: <a href="https://stackoverflow.com/questions/4242677/what-is-the-difference-between-a-and-l">What is the difference between &#39;a and &#39;_l?</a></p>