haskell-opengl / OpenGL

Haskell bindings to OpenGL
http://www.haskell.org/haskellwiki/OpenGL
BSD 3-Clause "New" or "Revised" License
147 stars 26 forks source link

OpenGL does not compile on 9.6.3: ‘fail’ is not a (visible) method of class ‘Monad’ #95

Open GeorgeCo opened 8 months ago

GeorgeCo commented 8 months ago

cabal install --lib OpenGL ... src/Graphics/Rendering/OpenGL/GL/IOState.hs:40:4: error: [GHC-54721] ‘fail’ is not a (visible) method of class ‘Monad’ | 40 | fail str = IOState $ _ -> fail str | ^^^^

andreasabel commented 6 months ago

It does compile with cabal build:

OpenGL-3.0.3.0$ cabal build -w ghc-9.6.3
noughtmare commented 6 months ago

This has indeed been fixed in 3.0.3.0, but any other version will fail. I was just bitten by this because cabal selected 2.11.1.0 for some reason.

Can you make revisions for all the old releases on Hackage with an upper bound on base (< 4.13 if the info here is correct: https://wiki.haskell.org/MonadFail_Proposal)?

andreasabel commented 6 months ago

Here you go:

2024-01-14T16:25:20Z AndreasAbel OpenGL-3.0.2.2-r1 2024-01-14T16:25:20Z AndreasAbel OpenGL-3.0.2.1-r1 2024-01-14T16:25:19Z AndreasAbel OpenGL-3.0.2.0-r1 2024-01-14T16:25:19Z AndreasAbel OpenGL-3.0.1.0-r1 2024-01-14T16:25:18Z AndreasAbel OpenGL-3.0.0.2-r1 2024-01-14T16:25:18Z AndreasAbel OpenGL-3.0.0.1-r1 2024-01-14T16:25:18Z AndreasAbel OpenGL-3.0.0.0-r1 2024-01-14T16:25:17Z AndreasAbel OpenGL-2.6.0.1-r3 2024-01-14T16:25:16Z AndreasAbel OpenGL-2.6.0.0-r2 2024-01-14T16:25:16Z AndreasAbel OpenGL-2.5.0.0-r2 2024-01-14T16:25:12Z AndreasAbel OpenGL-2.13.2.0-r1 2024-01-14T16:25:11Z AndreasAbel OpenGL-2.13.1.1-r1 2024-01-14T16:25:11Z AndreasAbel OpenGL-2.13.1.0-r2 2024-01-14T16:25:10Z AndreasAbel OpenGL-2.13.0.0-r1 2024-01-14T16:25:10Z AndreasAbel OpenGL-2.12.0.1-r1 2024-01-14T16:25:09Z AndreasAbel OpenGL-2.12.0.0-r1 2024-01-14T16:25:09Z AndreasAbel OpenGL-2.11.1.0-r2 2024-01-14T16:25:09Z AndreasAbel OpenGL-2.11.0.0-r2 2024-01-14T16:25:08Z AndreasAbel OpenGL-2.10.0.2-r2 2024-01-14T16:25:08Z AndreasAbel OpenGL-2.10.0.1-r2 2024-01-14T16:25:07Z AndreasAbel OpenGL-2.10.0.0-r2