Wolfgang Jeltsch pushed to branch wip/jeltsch/portable-bco-byte-array-serialization at Glasgow Haskell Compiler / GHC Commits: fce533d8 by Wolfgang Jeltsch at 2026-11-26T17:26:05+02:00 Switch to using `#ifdef` and `#ifndef` - - - - - 1 changed file: - libraries/ghci/GHCi/ResolvedBCO.hs Changes: ===================================== libraries/ghci/GHCi/ResolvedBCO.hs ===================================== @@ -46,7 +46,7 @@ import Control.Monad (replicateM) #endif isLittleEndian :: Bool -#if defined(WORDS_BIGENDIAN) +#ifdef WORDS_BIGENDIAN isLittleEndian = False #else isLittleEndian = True @@ -183,7 +183,7 @@ getBCOByteArrayPortably getElement = do #endif -#if !defined(WORDS_BIGENDIAN) +#ifndef WORDS_BIGENDIAN -- | Serialize a 'BCOByteArray', writing the payload verbatim instead of -- serializing the individual elements. This must only be used when the host @@ -214,7 +214,7 @@ getBCOByteArrayDirectly @a = do -- See Note [BCOByteArray serialization]. instance Binary (BCOByteArray Word16) where -#if defined(WORDS_BIGENDIAN) +#ifdef WORDS_BIGENDIAN put = putBCOByteArrayPortably putWord16le get = getBCOByteArrayPortably getWord16le #else View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fce533d895359134b292f0f31a0918cf... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fce533d895359134b292f0f31a0918cf... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help