Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

built failure #34

Open
phadej opened this issue Jan 8, 2025 · 2 comments
Open

built failure #34

phadej opened this issue Jan 8, 2025 · 2 comments

Comments

@phadej
Copy link
Contributor

phadej commented Jan 8, 2025

src/Graphics/SVGFonts/Text.hs:53:35: error:
    Ambiguous occurrence ‘Default’
    It could refer to
       either ‘Data.Default.Class.Default’,
              imported from ‘Data.Default.Class’ at src/Graphics/SVGFonts/Text.hs:34:1-25
           or ‘Diagrams.Prelude.Default’,
              imported from ‘Diagrams.Prelude’ at src/Graphics/SVGFonts/Text.hs:35:1-68
              (and originally defined in ‘data-default-0.8.0.0:Data.Default.Internal’)
   |
53 | instance (Read n, RealFloat n) => Default (TextOpts n) where

I think that recent revisions to diagrams ecosystem related to data-default-0.8 major breakage were handled too softly.

As Default is part of external interface, it's just created a mess.

Latest diagrams-lib uses data-default, but SVGFonts depends on data-default-class. Old data-default-class and new data-default can co-exist, which causes install plans like above having two different Default in scope possible.


IMHO the only clean solution is to have major releases of everything (withDefault in public API), and only use the later data-default. data-default change was big and disruptive, I don't see a way to go around it in non-major way.

@phadej
Copy link
Contributor Author

phadej commented Jan 8, 2025

But one can begin with by having

data-default-class (>=0.1 && <0.3)

revised to

data-default-class (>=0.2 && <0.3)

It still may cause problems to the end users, but at least it won't fail to compile itself.

@byorgey
Copy link
Member

byorgey commented Jan 9, 2025

Thanks for reporting, I'll look into this soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants