Imagine a program
foo x =
let f n = g (n-1)
g n = f (n-2)
h n = 42*n
in
f (h x)
Here f
and g
form a minimal set of mutually depending bindings.
They do not depend on h
, nor does h
depend on any of them. So we could re-write it as
foo x =
let h n = 42*n in
let f n = g (n-1)
g n = f (n-2)
in
f (h x)
but we couldn't break up the group of f
and g
-- they must go together, as each one of them refers to the other.
Here, both f
and g
binding are function bindings, so they are unrestricted, but if we had g = \n -> f (n-2)
there, it would mean that g
's binding is a simple pattern binding, and both f
an g
would become subject to the monomorphism restriction.
We could say h, f, g
are a set of bindings, but it is not minimal, because we can take h
out of that group. Only when we can't take out any names anymore, we've got the minimal (i.e. the smallest in size) group. So if we re-write g = \n -> f (n-2)
, g
becomes simple pattern binding, becomes subject to the restriction, and f
becomes subject to the restriction together with it, even though f
's bindind is a function binding. But h
remains unaffected.