{-# LANGUAGE CPP #-}
{-# OPTIONS_HADDOCK hide #-}
module Clash.CPP
( maxTupleSize
, haddockOnly
, fSuperStrict
, fStrictMapSignal
) where
#ifndef MAX_TUPLE_SIZE
#ifdef LARGE_TUPLES
#if MIN_VERSION_ghc(9,0,0)
import GHC.Settings.Constants (mAX_TUPLE_SIZE)
#else
import Constants (mAX_TUPLE_SIZE)
#endif
#define MAX_TUPLE_SIZE (fromIntegral mAX_TUPLE_SIZE)
#else
#ifdef HADDOCK_ONLY
#define MAX_TUPLE_SIZE 3
#else
#define MAX_TUPLE_SIZE 12
#endif
#endif
#endif
maxTupleSize :: Num a => a
maxTupleSize = MAX_TUPLE_SIZE
haddockOnly :: Bool
#ifdef HADDOCK_ONLY
haddockOnly = True
#else
haddockOnly = False
#endif
fSuperStrict :: Bool
#ifdef CLASH_SUPER_STRICT
fSuperStrict = True
#else
fSuperStrict = False
#endif
{-# INLINE fSuperStrict #-}
fStrictMapSignal :: Bool
#ifdef CLASH_STRICT_MAPSIGNAL
fStrictMapSignal = True
#else
fStrictMapSignal = False
#endif
{-# INLINE fStrictMapSignal #-}