<commit_before>
module Test.Forward(main) where

import Development.Shake
import Development.Shake.Forward
import Development.Shake.FilePath
import Test.Type

main = shaken test $ \args obj -> forwardRule $ do
    let src = "src/Test/C"
    cs <- getDirectoryFiles src ["*.c"]
    os <- forP cs $ \c -> do
        let o = obj c <.> "o"
        cache $ cmd "gcc -c" [src </> c] "-o" [o]
        return o
    cache $ cmd "gcc -o" [obj "Main" <.> exe] os

test build obj = do
    build ["--forward"]<commit_msg>Don't do the forward test if we don't have fsatrace<commit_after>
module Test.Forward(main) where

import Development.Shake
import Development.Shake.Forward
import Development.Shake.FilePath
import Control.Monad.Extra
import Test.Type

main = shaken test $ \args obj -> forwardRule $ do
    let src = "src/Test/C"
    cs <- getDirectoryFiles src ["*.c"]
    os <- forP cs $ \c -> do
        let o = obj c <.> "o"
        cache $ cmd "gcc -c" [src </> c] "-o" [o]
        return o
    cache $ cmd "gcc -o" [obj "Main" <.> exe] os

test build obj = do
    whenM hasTracker $
        build ["--forward"]
{'fraction_non_alphanumeric': 0.13989169675090252, 'fraction_numerical': 0.0, 'mean_word_length': 2.498422712933754, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2087605', 'n_tokens_mistral': 383, 'n_tokens_neox': 370, 'n_words': 132}