Can't use type names without fully qualifying them
Tried to build an old project and it now fails because referring to types without fully qualifying them is not possible.
Use to work:
(defmodule Mod
(deftype Ok [a Int])
(deftype NotOk [a Ok]))
What is needed now:
(defmodule Mod
(deftype Ok [a Int])
(deftype NotOk [a Mod.Ok]))
Thanks! This is due to the fact that we actually support module encapsulation of types now. Before the original code was really adding Ok and NotOk to the global type environment even though the calls occur in Mod, whereas now it actually adds it to Mod. The only problem is the type lookup isn't taking the current context path into account.
Ok so what you are saying is that declaring my types at the top level should actually be equivalent to the previous behaviour?
Yes, if you declare them outside the module it should work as expected.