Changes to class members break some explicit imports
With the latest changes to the way the compiler handles macro members, there are issues with explicit imports of classes containing macro members.
On today's itask compiler with today's clean-platform, it seems that any program importing Data.Foldable fails to build when building with cpm:
module fold
import Data.Foldable
Start = 1
The errors:
Error [Data.Foldable.dcl,6,import]: macro foldr not imported
Error [Data.Foldable.dcl,5,import]: function/macro const not imported
Changing lines 5 and 6 of Foldable.dcl to
from Data.Functor import class Functor (..), const
from Data.Monoid import class Monoid (..), class Semigroup (..), foldr
yields a run-time error in the compiler:
Run time error, rule '[line:696];15;434' in module 'explicitimports' does not match
(Perhaps this is because Data.Foldable also wants to define foldr?)
Using simple imports of the entire Data.Functor/Monoid modules in Data.Foldable works.
Curiously, the first problem (that macros are not imported) does not occur when compiling with clm, but the second problem (run-time error in the compiler) does occur when compiling with clm, although @mlubbers's clm is apparently not immune to the first problem.