defining Cabal macro if not defined.

This commit is contained in:
Kazu Yamamoto 2014-08-08 13:53:06 +09:00
parent 7ab66f9304
commit 52515fe202
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,9 @@
{-# LANGUAGE CPP #-}
#ifndef MIN_VERSION_base
#define MIN_VERSION_base(x,y,z) 1
#endif
module Network.Wai.Handler.Warp.IORef (
module Data.IORef
#if !MIN_VERSION_base(4,6,0)

View File

@ -42,6 +42,10 @@ module Network.Wai.Handler.Warp.Timeout (
, TimeoutThread (..)
) where
#ifndef MIN_VERSION_base
#define MIN_VERSION_base(x,y,z) 1
#endif
#if MIN_VERSION_base(4,6,0)
import Control.Concurrent (mkWeakThreadId, ThreadId)
#else