GrammaticalFramework/gf-core

various deprecations during compilation of GF

Closed this issue · 2 comments

Compiling GF the other day with GHC 8.4.4, lts-12.26, I saw some errors which perhaps call for tweaking?

> Building library for gf-3.10..
> [  1 of 163] Compiling CGI
> [  2 of 163] Compiling CGIUtils
> [  3 of 163] Compiling Cache
> [  4 of 163] Compiling Data.Binary.Builder
>
> /private/var/folders/t3/cv27h8kn7wb3xfgpgxdpk7vc0000gn/T/stack95801/gf-3.10/src/runtime/haskell/Data/Binary/Builder.hs:202:40: warning: [-Wdeprecations]
>     In the use of ‘inlinePerformIO’
>     (imported from Data.ByteString.Internal):
>     Deprecated: "If you think you know what you are doing, use 'unsafePerformIO'. If you are sure you know what you are doing, use 'unsafeDupablePerformIO'. If you enjoy sharing an address space with a malevolent agent of chaos, try 'accursedUnutterablePerformIO'."
>     |
> 202 | unsafeLiftIO f =  Builder $ \ k buf -> inlinePerformIO $ do
>     |                                        ^^^^^^^^^^^^^^^
> [  5 of 163] Compiling Data.Binary.Get
>
> /private/var/folders/t3/cv27h8kn7wb3xfgpgxdpk7vc0000gn/T/stack95801/gf-3.10/src/runtime/haskell/Data/Binary/Get.hs:417:14: warning: [-Wdeprecations]
>     In the use of ‘inlinePerformIO’
>     (imported from Data.ByteString.Internal):
>     Deprecated: "If you think you know what you are doing, use 'unsafePerformIO'. If you are sure you know what you are doing, use 'unsafeDupablePerformIO'. If you enjoy sharing an address space with a malevolent agent of chaos, try 'accursedUnutterablePerformIO'."
>     |
> 417 |     return . B.inlinePerformIO $ withForeignPtr fp $ \p -> peek (castPtr $ p `plusPtr` o)
>     |              ^^^^^^^^^^^^^^^^^


> [ 60 of 163] Compiling PGF.TypeCheck
>
> /private/var/folders/t3/cv27h8kn7wb3xfgpgxdpk7vc0000gn/T/stack95801/gf-3.10/src/runtime/haskell/PGF/TypeCheck.hs:44:1: warning: [-Wdeprecations]
>     Module ‘Control.Monad.Error’ is deprecated:
>       Use "Control.Monad.Except" instead
>    |
> 44 | import Control.Monad.Error
>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^

Does #71 fix this as well?

No, it does not. I was thinking of fixing it, but I was unsure if I was supposed to replace inlinePerformeIO with accursedUnutterablePerformIO or some safer variant, so I left it as it was for now.