title: Signature Mismatch ocaml
body: <p>First the code: </p>
  
  <pre><code>module type ENV_CORE =
  sig 
  type variable 
  type 'a environment
  exception Unbound_variable
  val empty : unit -&gt; variable
  val bind : 'a -&gt; 'a environment -&gt; 'a environment
  val unbind : variable -&gt; 'a -&gt; 'a environment -&gt; 'a environment
  val is_bound : variable -&gt; 'a environment -&gt; bool
  val lookup : variable -&gt; 'a environment -&gt; bool
  val fold : (variable -&gt; 'a -&gt; 'b -&gt; 'b) -&gt; 'a environment -&gt; 'b -&gt; 'b
  end;;
  
  
  module EnvCoreList : ENV_CORE =
  
  struct
      type variable = string list
      type 'a environment = variable * variable -&gt; 'a
      exception Unbound_variable
      let empty () = []
      let bind elt l = elt::l
      let rec unbind elt l =
          match l with
          |[] -&gt; raise Unbound_variable
          |a::r -&gt; if (elt = a)
              then r
              else a::(unbind elt r)
      let rec is_bound elt l =
          match l with
          |[] -&gt; raise Unbound_variable
          |a::r -&gt; if (elt = a)
              then true
              else is_bound elt r
      let rec lookup elt l =
          match l with
          |[] -&gt; false
          |a::r -&gt; if (elt = a)
              then true
              else lookup elt r
      let rec fold f rho gamma =
          match rho with
          |[] -&gt; gamma
          |a::r -&gt; f a (fold f r gamma)
  end;;
  </code></pre>
  
  <p>When I compile it I get the following error:</p>
  
  <pre><code>Error: Signature mismatch:
     Modules do not match:
       sig
         type variable = string list
         type 'a environment = variable * variable -&gt; 'a
         exception Unbound_variable
         val empty : unit -&gt; 'a list
         val bind : 'a -&gt; 'a list -&gt; 'a list
         val unbind : 'a -&gt; 'a list -&gt; 'a list
         val is_bound : 'a -&gt; 'a list -&gt; bool
         val lookup : 'a -&gt; 'a list -&gt; bool
         val fold : ('a -&gt; 'b -&gt; 'b) -&gt; 'a list -&gt; 'b -&gt; 'b
       end
     is not included in
       ENV_CORE
     Values do not match:
       val bind : 'a -&gt; 'a list -&gt; 'a list
     is not included in
       val bind : 'a -&gt; 'a environment -&gt; 'a environment
  </code></pre>
  
  <p>What I don't understand is how the more specific type isn't included in the more general type?
  I couldnt find any similar questions and havent been able to resolve this issue. 
  Thanx</p>