tetris icon indicating copy to clipboard operation
tetris copied to clipboard

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

Open Svenum opened this issue 11 months ago • 3 comments

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'.

Svenum avatar Mar 18 '24 17:03 Svenum

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

MarkowEduard avatar Apr 17 '24 08:04 MarkowEduard

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

Svenum avatar Apr 17 '24 15:04 Svenum

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 avatar Apr 18 '24 02:04 samtay

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

samtay avatar May 07 '24 16:05 samtay