Loading ...
Sorry, an error occurred while loading the content.

11163Re: "ocaml_beginners"::[] Module parameterization by ints

Expand Messages
  • Phil Tomson
    Jul 1, 2009
    • 0 Attachment
      On 7/1/09, Matthieu Dubuget <matthieu.dubuget@...> wrote:
      > It seems to me that this is exactly the same?
      >
      > define a functor MyFunctor like this:
      > module MyFunctor (S : sig val sz : int end) =
      > struct
      > ... S.sz ... ← in your module, you now have
      > access to S.sz
      > end
      >
      >
      >
      > Your module can now be generated like this:
      >
      > module MyModule = MyFunctor (struct let sz = 3 end);;
      >
      > Hoping this helps?
      >

      Thanks, that should do what I need.

      Phil
    • Show all 8 messages in this topic