Cannot define function signature with type parameter?


#1

Why isn’t the following allowed?

module Foo = {
  type t = {
    .
    bar: 'a => 'a
  };
};

When compiling I get:

Unbound type parameter 'a


#2

Hi! Adding ('a) after type t should make it bound like:

module Foo = {
  type t('a) = {
    .
    bar: 'a => 'a
  };
};

#3

Thanks!

Having to parameterize t as well is not something I want to do, but I guess I will have to design my program another way.