augustss / MicroHs

Haskell implemented with combinators
Other
367 stars 25 forks source link

Named qualified import makes instance method not get found #56

Closed ysangkok closed 3 months ago

ysangkok commented 3 months ago

This is similar to #52 , but the import now names the module.

module Test where                                                                   
import qualified Data.Foldable as Foldable                                          

data MyID a = MyID a                                                                

instance Foldable.Foldable MyID where                                               
  foldMap f (MyID a) = f a                                                          

main = main

This compiles in GHC, but in MicroHs v0.9.15.0 it fails with undefined value: fold$dflt. If the import is open, there is no failure.

augustss commented 3 months ago

Thanks for the report. It should work now.