Skip to content

Build errors with recent GHC versions #4

@jhrcek

Description

@jhrcek

Hello @sras

I'm pretty excited to have found this package.
I like the ergonomics and simplicity (yet very comprehensive support for aeson Options + out of the box support for parametrized types).

Are you still interested in maintaining this package?
I'm getting build errors when trying to build it with ghc 9.12.2.

I fixed this errors in my fork, replaced stack + package.yaml + travis config with plain cabal file and github actions CI config generated by haskell-ci, to make sure it builds with couple of recent GHC versions - see my fork where I made everything compile with ghc 9.6 - 9.12: https://github.com/jhrcek/elminator/pull/1/changes

I suspect those changes might be too large for your taste, so I'd like to check with you if you would be OK with (at least some of) the following changes from the above PR in my fork?:

  1. fix ghc build errors
example
Failed to build elminator-0.2.4.4.
Build log (
/home/jhrcek/.cabal/logs/ghc-9.12.2/elminator-0.2.4.4-25e5e3ac8cf3b22b71d35d8ee0c7e75f7b47cef80d8cee5e6ca5e2ab79cfe964.log
):
Configuring library for elminator-0.2.4.4...
Preprocessing library for elminator-0.2.4.4...
Building library for elminator-0.2.4.4...
[1 of 7] Compiling Elminator.ELM.Render ( src/Elminator/ELM/Render.hs, dist/build/Elminator/ELM/Render.o, dist/build/Elminator/ELM/Render.dyn_o )
src/Elminator/ELM/Render.hs:200:50: error: [GHC-87543]
    Ambiguous occurrence ‘show’.
    It could refer to
       either ‘Prelude.show’,
              imported from ‘Prelude’ at src/Elminator/ELM/Render.hs:3:8-27
              (and originally defined in ‘ghc-internal-9.1202.0:GHC.Internal.Show’),
           or ‘T.show’,
              imported from ‘Data.Text’ at src/Elminator/ELM/Render.hs:8:1-36.
    |
200 | renderLiteral (EStringL s) = renderText $ pack $ show s
    |                                                  ^^^^

src/Elminator/ELM/Render.hs:201:47: error: [GHC-87543]
Ambiguous occurrence ‘show’.
It could refer to
either ‘Prelude.show’,
imported from ‘Prelude’ at src/Elminator/ELM/Render.hs:3:8-27
(and originally defined in ‘ghc-internal-9.1202.0:GHC.Internal.Show’),
or ‘T.show’,
imported from ‘Data.Text’ at src/Elminator/ELM/Render.hs:8:1-36.
|
201 | renderLiteral (EIntL x) = renderText $ pack $ show x
| ^^^^

[4 of 7] Compiling Elminator.Generics.Simple ( src/Elminator/Generics/Simple.hs, dist/build/Elminator/Generics/Simple.o, dist/build/Elminator/Generics/Simple.dyn_o )
[5 of 7] Compiling Elminator.Lib ( src/Elminator/Lib.hs, dist/build/Elminator/Lib.o, dist/build/Elminator/Lib.dyn_o )
src/Elminator/Lib.hs:211:45: error: [GHC-87543]
Ambiguous occurrence ‘show’.
It could refer to
either ‘Prelude.show’,
imported from ‘Prelude’ at src/Elminator/Lib.hs:3:8-20
(and originally defined in ‘ghc-internal-9.1202.0:GHC.Internal.Show’),
or ‘T.show’,
imported from ‘Data.Text’ at src/Elminator/Lib.hs:38:1-36.
|
211 | x -> error $ "Unsupported type info" ++ show x
| ^^^^

src/Elminator/Lib.hs:233:36: error: [GHC-87543]
Ambiguous occurrence ‘show’.
It could refer to
either ‘Prelude.show’,
imported from ‘Prelude’ at src/Elminator/Lib.hs:3:8-20
(and originally defined in ‘ghc-internal-9.1202.0:GHC.Internal.Show’),
or ‘T.show’,
imported from ‘Data.Text’ at src/Elminator/Lib.hs:38:1-36.
|
233 | x -> error ("Unimplemented" ++ show x)
| ^^^^

Error: [Cabal-7125]
Failed to build elminator-0.2.4.4 (which is required by exe:elminator-play from elminator-play-0.1.0.0). See the build log above for details.

  1. remove travis.yaml
  2. add haskell-ci generated github actions config
  3. fix hlint warnings
  4. (optional) replace stack configs with cabal file (these days stack maintenance is on back burner and cabal is the more actively maintained buidl tool)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions