Skip to content
Snippets Groups Projects
Commit aac2b352 authored by Edward Z. Yang's avatar Edward Z. Yang Committed by GitHub
Browse files

Merge pull request #3918 from ezyang/pr/binary-macro-fix

Handle the case when min-version binary macro is not defined.
parents a3c89c96 ba381923
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,23 @@ import Data.String (IsString(..)) ...@@ -25,6 +25,23 @@ import Data.String (IsString(..))
# endif # endif
#endif #endif
-- Hack for GHC bootstrapping
--
-- Currently (as of GHC 8.1), GHC bootstraps Cabal by building
-- binary and Cabal in one giant ghc --make command. This
-- means no MIN_VERSION_binary macro is available.
--
-- We could try to cleverly figure something out in this case,
-- but there is a better plan: just use the unoptimized version
-- of the Binary instance. We're not going to use it for anything
-- real in any case.
--
-- WARNING: Don't use MIN_VERSION_binary to smooth over a BC-break!
--
#ifndef MIN_VERSION_binary
#define MIN_VERSION_binary(x, y, z) 0
#endif
#if HAVE_SHORTBYTESTRING #if HAVE_SHORTBYTESTRING
import qualified Data.ByteString.Short as BS.Short import qualified Data.ByteString.Short as BS.Short
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment