user15644696
user15644696

Reputation: 1

How can I solve Haskell utililty source code compilation failure?

I have an application written in Haskell that needs to use some utilities with complete source code, which only require recompilation.

Style of error:

src/UtilitiesModule/Types/aaa.hs:53:10: warning: [-Wmissing-methods]

    • No explicit implementation for

        (either ‘peek’
                or
                ‘peekElemOff’
                or
                ‘peekByteOff’) and (either ‘poke’
                                           or
                                           ‘pokeElemOff’
                                           or
                                           ‘pokeByteOff’)
    • In the instance declaration for ‘Storable NStr’
   |
53 | instance Storable NStr where

In source code:

type NStr = Buffer0
type AStr = NStr

type ChunkWriter c = WriterT (ChunkQueue c)
type WriterStateIO v a = forall c m. (Chunk c, MonadReader v m) => ChunkWriter c m a

instance Storable NStr where
    alignment _ = 8
    sizeOf      = S.length . packBuf

I'm fairly certain that the provided utilities were able to compile successfully when they were originally written.

However, I'm not sure if the issue is due to the GHC compiler version. The source code was written around GHC 8.0.x, but I am using GHC 8.10.

I have encountered multiple errors throughout the code, such as "No explicit implementation for ..." or issues with 'peek' and 'poke'.

Upvotes: -1

Views: 56

Answers (0)

Related Questions