You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using the convert from import Data.Convertible.Base (convert). The compiler kept complaining about the lack of suitable Convertible instances for types that definitely did have Convertible instances (such as instance Convertible Char Int).
I finally figured out that I had to instead use import Data.Convertible (convert). But this is baffling to me because Data.Convertible just re-exports the stuff from Data.Convertible.Base. Can anyone explain why this happens?
The text was updated successfully, but these errors were encountered:
This is because Data.Convertible.Base does not contain the instances. These are Data.Convertible.Instances (and submodules), which is imported by Data.Convertible. Since instances can't be explicitly imported, you get the automatically when you import Data.Convertible, but not when you import Data.Convertible.Base.
Ah I see. Would it make sense to put something in the README about this? Or perhaps just hide the Data.Convertible.Base module entirely and only allow access via the Data.Convertible re-export?
I was using the
convert
fromimport Data.Convertible.Base (convert)
. The compiler kept complaining about the lack of suitableConvertible
instances for types that definitely did haveConvertible
instances (such asinstance Convertible Char Int
).I finally figured out that I had to instead use
import Data.Convertible (convert)
. But this is baffling to me becauseData.Convertible
just re-exports the stuff fromData.Convertible.Base
. Can anyone explain why this happens?The text was updated successfully, but these errors were encountered: