samtay / tetris

A terminal interface for Tetris
Other
871 stars 40 forks source link

Build error NB: the module ‘Graphics.Vty’ does not export ‘mkVty’. #35

Closed Svenum closed 3 months ago

Svenum commented 5 months ago

If I build this project I get the following error message:

src/UI/Game.hs:69:17: error: [GHC-76037]
    Not in scope: ‘V.mkVty’
    NB: the module ‘Graphics.Vty’ does not export ‘mkVty’.
    Suggested fix:
      Perhaps use data constructor ‘V.Vty’ (imported from Graphics.Vty)
   |
69 |   let builder = V.mkVty V.defaultConfig
   |                 ^^^^^^^
[3 of 3] Compiling UI.PickLevel     ( src/UI/PickLevel.hs, dist/build/UI/PickLevel.o, dist/build/UI/PickLevel.dyn_o )
error: builder for '/nix/store/lqw7zgbhxz4g4zh27g6wyb06j8yg340g-tetris-0.1.4.1.drv' failed with exit code 1;
       last 10 log lines:
       >
       > src/UI/Game.hs:69:17: error: [GHC-76037]
       >     Not in scope: ‘V.mkVty’
       >     NB: the module ‘Graphics.Vty’ does not export ‘mkVty’.
       >     Suggested fix:
       >       Perhaps use data constructor ‘V.Vty’ (imported from Graphics.Vty)
       >    |
       > 69 |   let builder = V.mkVty V.defaultConfig
       >    |                 ^^^^^^^
       > [3 of 3] Compiling UI.PickLevel     ( src/UI/PickLevel.hs, dist/build/UI/PickLevel.o, dist/build/UI/PickLevel.dyn_o )
       For full logs, run 'nix log /nix/store/lqw7zgbhxz4g4zh27g6wyb06j8yg340g-tetris-0.1.4.1.drv'.
MarkowEduard commented 4 months ago

This is true for the currrent version of the Haskell platform interface to the underlying UNIX API. With this entry in stack.yaml we encounter the problem: resolver: url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/13.yaml With this entry in stack.yaml we avoid the problem: resolver: url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/26.yaml

Svenum commented 4 months ago

Sorry, I have never done anything in haskell. Could you tell me what to add to the stack.yml?

samtay commented 4 months ago

I'm not a nix user, is there a way to have nix build via stack? Otherwise, it'll probably be a pain to pin these older dependencies, and I'm not sure how to go about that. If you use nix to just install stack itself, then you shouldn't have to modify the stack.yaml at all, as it specifies the older lts-20.1. That is, stack build should "just work".

samtay commented 3 months ago

I've updated main to use the latest brick version.