spacepaste

  1.  
  2. module X = struct
  3. type t = {a: int}
  4. let make a = {a}
  5. end
  6. module Y = struct
  7. type t = {b: int}
  8. let make b = {b}
  9. let of_x x = {b = x.X.a}
  10. end
  11. let int_of_x x = x.X.a
  12. let int_of_y y = y.Y.b
  13.