Error: Unbound type constructor Lazy.t

Hello,
I have been using the following definition of lazy list:
type 'a llist = LNil | LCons of 'a * 'a llist Lazy.t;;
But it stopped compiling since a few days ago with error:
Error: Unbound type constructor Lazy.t

But it is working when I paste it into interpreter.
I am compiling using ocamlbuild command.
I have tried to opam switch to older version (4.09.0 to 4.07.0) but with no success.

Did something change to the Lazy module? I was not able to find anything.
If so, is there a way I can continue using this definition?

Most probably there is another module called Lazy in scope that is shadowing the standard library one.

1 Like

File named lazy.ml was the issue, thank you.
I need to read about modules!