------------------------------------------------------------------------------- {- LANGUAGE CPP #-} -- specified in .cabal default-extensions ------------------------------------------------------------------------------- {- LANGUAGE BangPatterns #-} {- OPTIONS_GHC -fno-warn-name-shadowing #-} ------------------------------------------------------------------------------- -- | -- Module : Control.DeepSeq.Bounded.Flags -- Copyright : Andrew G. Seniuk 2014-2015 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Andrew Seniuk -- Stability : unstable -- Portability : portable (CPP) -- -- This module exposes some of the deepseq-bounded Cabal flags, -- so reverse dependencies can check their status. ------------------------------------------------------------------------------- module Control.DeepSeq.Bounded.Flags ( -- * Transient flag while old grammar is phased out deepseq_bounded_flag__new_improved_pattern_grammar , #if 0 -- * Optional NFDataP features deepseq_bounded_flag__use_par_patnode , deepseq_bounded_flag__use_pseq_patnode , deepseq_bounded_flag__use_trace_patnode , deepseq_bounded_flag__use_ping_patnode , deepseq_bounded_flag__use_die_patnode , #endif #if 0 -- * Quick and dirty way to get ahold of the ThreadId -- of the main thread, when seqaid is being used -- on the other side to instrument the executable -- we're testing, studying, optimising, whatever... deepseq_bounded_ioref__main_thread_id , #endif ) where import Data.IORef ( IORef, newIORef ) import Control.Concurrent ( ThreadId ) import System.IO.Unsafe ( unsafePerformIO ) ------------------------------------------------------------------------------- #if 0 deepseq_bounded_ioref__main_thread_id = unsafePerformIO $ newIORef (undefined::ThreadId) #endif ------------------------------------------------------------------ #if NEW_IMPROVED_PATTERN_GRAMMAR deepseq_bounded_flag__new_improved_pattern_grammar = True #else deepseq_bounded_flag__new_improved_pattern_grammar = False #endif ------------------------------------------------------------------ #if 0 #if USE_PAR_PATNODE deepseq_bounded_flag__use_par_patnode = True #else deepseq_bounded_flag__use_par_patnode = False #endif #if USE_PSEQ_PATNODE deepseq_bounded_flag__use_pseq_patnode = True #else deepseq_bounded_flag__use_pseq_patnode = False #endif #if USE_TRACE_PATNODE deepseq_bounded_flag__use_trace_patnode = True #else deepseq_bounded_flag__use_trace_patnode = False #endif #if USE_PING_PATNODE deepseq_bounded_flag__use_ping_patnode = True #else deepseq_bounded_flag__use_ping_patnode = False #endif #if USE_DIE_PATNODE deepseq_bounded_flag__use_die_patnode = True #else deepseq_bounded_flag__use_die_patnode = False #endif #endif ------------------------------------------------------------------ -------------------------------------------------------------------------------