Types used in class have to be imported in icl
When defining a class in a dcl that relies on types defined in other modules, it is not sufficient to import the types in the dcl only. They also have to be imported in the icl. I think this is counter-intuitive and might be a bug.
Minimal example:
Type.dcl
definition module Type
:: MyType = MyType
Class.dcl
definition module Class
import Type
class foo a where
bar :: a -> MyType
Class.icl
implementation module Class
Start = 0
Running clm Class
results in Error [Class.dcl,6,bar]: MyType undefined
.
Adding import Type
to Class.icl
solves the problem. I think this is strange.