let b:int=5

module D = struct
  let c:unit=()
end

module E = struct
  let c:int = 5
end

module A(B : sig val c : unit end) (B : sig val c : int end) = struct
  module B = struct
    let c:int = B.c
    let d:unit = ()
  end
  let a:unit = B.d
end

module G = A(D)
module F = G(E)

module H = struct
  let a:int=b
  let c:unit=F.a
end
