This program fails to compile with MicroHs e3161204db4fbc9032cbdbeab83529db2a095ad4, but succeeds with GHC 9.10.1:
module Minimal where
import Data.Foldable (Foldable(foldMap))
newtype ID a = MkID a
instance Foldable ID where
foldMap :: Monoid m => (a -> m) -> ID a -> m
foldMap f (MkID a) = f a
main :: IO ()
main = pure ()
The failure is
mhs: "./Minimal.hs": line 7, col 10: undefined value: fold$dflt
I didn't refer to fold, so I shouldn't need to import it.
If I change the import to be open (import Data.Foldable), it compiles.
This program fails to compile with MicroHs
e3161204db4fbc9032cbdbeab83529db2a095ad4
, but succeeds with GHC 9.10.1:The failure is
I didn't refer to
fold
, so I shouldn't need to import it.If I change the import to be open (
import Data.Foldable
), it compiles.