module Development.Shake.Rerun(
defaultRuleRerun, alwaysRerun
) where
import Control.DeepSeq
import Data.Binary
import Data.Hashable
import Data.Typeable
import Development.Shake.Core
newtype AlwaysRerunQ = AlwaysRerunQ ()
deriving (Typeable,Eq,Hashable,Binary,NFData)
instance Show AlwaysRerunQ where show _ = "AlwaysRerunQ"
newtype AlwaysRerunA = AlwaysRerunA ()
deriving (Typeable,Hashable,Binary,NFData)
instance Show AlwaysRerunA where show _ = "AlwaysRerunA"
instance Eq AlwaysRerunA where a == b = False
instance Rule AlwaysRerunQ AlwaysRerunA where
storedValue _ = return Nothing
alwaysRerun :: Action ()
alwaysRerun = do AlwaysRerunA _ <- apply1 $ AlwaysRerunQ (); return ()
defaultRuleRerun :: Rules ()
defaultRuleRerun = defaultRule $ \AlwaysRerunQ{} -> Just $ return $ AlwaysRerunA()