{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable, ScopedTypeVariables #-}{-# LANGUAGE TypeFamilies #-}moduleDevelopment.Shake.Internal.Rules.Rerun(defaultRuleRerun ,alwaysRerun )whereimportDevelopment.Shake.Internal.Core.Rules importDevelopment.Shake.Internal.Core.Types importDevelopment.Shake.Internal.Core.Build importDevelopment.Shake.Internal.Core.Action importDevelopment.Shake.Classes importqualifiedData.ByteStringasBSimportGeneral.Binary newtypeAlwaysRerunQ =AlwaysRerunQ ()deriving(Typeable,Eq,Hashable,Binary,BinaryEx ,NFData)instanceShowAlwaysRerunQ whereshow _="alwaysRerun"typeinstanceRuleResult AlwaysRerunQ =()-- | Always rerun the associated action. Useful for defining rules that query-- the environment. For example:---- @-- \"ghcVersion.txt\" 'Development.Shake.%>' \\out -> do-- 'alwaysRerun'-- 'Development.Shake.Stdout' stdout <- 'Development.Shake.cmd' \"ghc --numeric-version\"-- 'Development.Shake.writeFileChanged' out stdout-- @---- In @make@, the @.PHONY@ attribute on file-producing rules has a similar effect.---- Note that 'alwaysRerun' is applied when a rule is executed. Modifying an existing rule-- to insert 'alwaysRerun' will /not/ cause that rule to rerun next time.alwaysRerun::Action ()alwaysRerun =dohistoryDisable apply1 $AlwaysRerunQ ()defaultRuleRerun::Rules ()defaultRuleRerun =addBuiltinRuleEx noLint noIdentity $\AlwaysRerunQ {}__->return$RunResult ChangedRecomputeDiff BS.empty()

AltStyle によって変換されたページ (->オリジナル) /