Skip to content

Conversation

@thelissimus
Copy link

This library fails to compile under GHC 9.12.2 with the following error:

[1 of 2] Compiling Data.Dependent.HashMap ( src/Data/Dependent/HashMap.hs, dist/build/Data/Dependent/HashMap.o, dist/build/Data/Dependent/HashMap.dyn_o )
src/Data/Dependent/HashMap.hs:70:5: error: [GHC-87543]
    Ambiguous occurrence ‘foldl'’.
    It could refer to
       either ‘Prelude.foldl'’,
              imported from ‘Prelude’ at src/Data/Dependent/HashMap.hs:93:1-82
              (and originally defined in ‘ghc-internal-9.1202.0:GHC.Internal.Data.Foldable’),
           or ‘Data.Dependent.HashMap.foldl'’,
              defined at src/Data/Dependent/HashMap.hs:658:1.
   |
70 |   , foldl'
   |     ^^^^^^

Although Prelude is imported with hiding (foldl'), it is also brought into scope implicitly, which causes the ambiguity. NoImplicitPrelude seems to fix it.

@thelissimus thelissimus changed the title add: NoImplicitPrelude to fix the ambigious foldl' prelude issue add: NoImplicitPrelude to fix the ambigious foldl' issue Oct 23, 2025
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

Successfully merging this pull request may close these issues.

1 participant