1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
-- | This module contains rule types that have special behaviour in some way.
-- Everything in this module is a hack.
module Development.Shake.Special(
specialAlwaysRebuilds,
specialIsFileKey
) where
import Development.Shake.Value
import Data.Typeable
specialAlwaysRebuilds :: Value -> Bool
specialAlwaysRebuilds v = con `elem` ["AlwaysRerunA","OracleA"] || (con == "FileA" && show v == "File {mod=NEQ,size=NEQ,digest=NEQ}")
where con = show $ fst $ splitTyConApp $ typeValue v
specialIsFileKey :: TypeRep -> Bool
specialIsFileKey t = con == "FileQ"
where con = show $ fst $ splitTyConApp t
|