mgsloan / store

Fast binary serialization in Haskell
MIT License
109 stars 35 forks source link

Build failure in store-core with force-alignment #133

Closed trommler closed 6 years ago

trommler commented 6 years ago

On PowerPC 64-bit I see the following build failure:

src/Data/Store/Core.hs:155:29: error:
    • Couldn't match type ‘PokeState’ with ‘IO PokeState’
      Expected type: Ptr Word8 -> IO PokeState
        Actual type: Ptr Word8 -> PokeState
    • In the first argument of ‘(=<<)’, namely ‘PokeState ptr’
      In the expression: PokeState ptr =<< f
      In an equation for ‘unsafeMakePokeState’:
          unsafeMakePokeState ptr f = PokeState ptr =<< f
    |
155 | unsafeMakePokeState ptr f = PokeState ptr =<< f
    |                             ^^^^^^^^^^^^^

src/Data/Store/Core.hs:277:29: error:
    • Couldn't match type ‘PeekState’ with ‘IO PeekState’
      Expected type: Ptr Word8 -> IO PeekState
        Actual type: Ptr Word8 -> PeekState
    • In the first argument of ‘(=<<)’, namely ‘PeekState ptr’
      In the expression: PeekState ptr =<< f
      In an equation for ‘unsafeMakePeekState’:
          unsafeMakePeekState ptr f = PeekState ptr =<< f
    |
277 | unsafeMakePeekState ptr f = PeekState ptr =<< f
    |                             ^^^^^^^^^^^^^

The failure can be reproduced on x86_64 with -fforce-alignment.

I'll prepare a pull request.

mgsloan commented 6 years ago

Fixed! Thanks for the PR