ptek / netsnmp

A NetSNMP binding for Haskell
http://hackage.haskell.org/package/NetSNMP
BSD 3-Clause "New" or "Revised" License
7 stars 4 forks source link

Not build on ghc-9.x #8

Closed arthur-den closed 6 months ago

arthur-den commented 6 months ago

Hi! Thank you for your library. It doesn't build on new versions. I made a fix for the problem, would you like check it and publish on hackage?

30a31
> import           Control.Monad.Fail
866c867
<   return a = Trouble $ return (Right a)
---
>   return = pure
870a872,874
> 
> instance MonadFail Trouble where
>   fail = Trouble . pure . Left
ptek commented 6 months ago

It is astonishing that the library is still being used. And its a good reminder to install ghc and try to see how much I still remember as I haven't worked with haskell for a while now. I'll try to incorporate it, hopefully soon. But also, if there is a different library out there for NetSNMP, it might see better support than this one.

arthur-den commented 6 months ago

Astonishingly, but actually your library is the only one.

ptek commented 6 months ago

Wow, it is almost 8 years since the last version has been uploaded. Speaking of stability of haskell libraries :) I've built the library with ghc-9.6.4 on my machine and https://hackage.haskell.org/package/NetSNMP-0.4.0.0 is out. Could you check if it solves the issues you were getting, please?

arthur-den commented 6 months ago

Great! I checked new version on ghc-9.2.8 and 9.6.4, the issue is solved. Thank you!

PS. It is a pity that hackage don't have libsnmp-dev and can't build this code https://hackage.haskell.org/package/NetSNMP-0.4.0.0/reports/2