luc-tielen / llvm-codegen

LLVM code generation in Haskell
BSD 3-Clause "New" or "Revised" License
50 stars 6 forks source link

Fix for ambiguous `show` error when compiling with ghc-9.2.7 #21

Closed kpadmasola closed 1 week ago

kpadmasola commented 1 week ago

Fixes the following error when compiling with ghc-9.2.7

lib/LLVM/Codegen/Name.hs:23:26: error:
Error:     Ambiguous occurrence ‘show’
    It could refer to
       either ‘Prelude.show’,
              imported from ‘Prelude’ at lib/LLVM/Codegen/Name.hs:1:8-24
              (and originally defined in ‘GHC.Show’)
           or ‘Data.Text.show’,
              imported from ‘Data.Text’ at lib/LLVM/Codegen/Name.hs:7:1-16
   |
23 |   Generated x -> pack $! show x
   |                          ^^^^
Error: [Cabal-7125]
Failed to build llvm-codegen-0.1.0.0.