MonadMask require new trait:generalBracket
problem
failed to install the zeromq4-haskell in my system,before system upgrade the ghc package,it work,but it not work now.+
src/System/ZMQ4/Monadic.hs:250:10: warning: [-Wmissing-methods]
• No explicit implementation for
‘generalBracket’
• In the instance declaration for ‘MonadMask (ZMQ z)’
|
250 | instance MonadMask (ZMQ z) where
| ^^^^^^^^^^^^^^^^^
- ghc-version: The Glorious Glasgow Haskell Compilation System, version 8.6.5
- system: Archlinux Linux Reaker 5.2.11-arch1-1-ARCH #1 (closed) SMP PREEMPT Thu Aug 29 08:09:36 UTC 2019 x86_64 GNU/Linux
ghc in archlinux package is dynamic linked.
solution-maybe
could we add this into src/System/ZMQ4/Monadic.hs at 257 ? it seems solve the problem.
generalBracket a sucThenResult packMonadResult = ZMQ . ReaderT $ \env ->
runReaderT (_unzmq$ C.generalBracket a sucThenResult packMonadResult) env
sorry for my poor code and language