<commit_before>{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}

-- | Types exposed to the user
module Development.Shake.Types where

import Control.Exception
import Data.Data
import Data.List


-- | Information about the current state of the build, obtained by passing a callback function
--   to 'shakeProgress'. Typically a program will poll this value to provide progress messages.
data Progress = Progress
    {isRunning :: !Bool -- ^ Starts out True, becomes False once the build has completed
    ,countSkipped :: {-# UNPACK #-} !Int -- ^ Number of rules which were required, but were already in a valid state
    ,countBuilt :: {-# UNPACK #-} !Int -- ^ Number of rules which were have been built in this run
    ,countUnknown :: {-# UNPACK #-} !Int -- ^ Number of rules which have been built previously, but are not yet known to be required
    ,countTodo :: {-# UNPACK #-} !Int -- ^ Number of rules which are currently required (ignoring dependencies that do not change), but not built
    ,timeSkipped :: {-# UNPACK #-} !Double -- ^ Time spent building 'shakeSkipped' rules in previous runs<commit_msg>Add an explicit export list to Types<commit_after>{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}

-- | Types exposed to the user
module Development.Shake.Types(
    Progress(..), Verbosity(..), Assume(..),
    ShakeOptions(..), shakeOptions,
    ShakeException(..)
    ) where

import Control.Exception
import Data.Data
import Data.List


-- | Information about the current state of the build, obtained by passing a callback function
--   to 'shakeProgress'. Typically a program will poll this value to provide progress messages.
data Progress = Progress
    {isRunning :: !Bool -- ^ Starts out True, becomes False once the build has completed
    ,countSkipped :: {-# UNPACK #-} !Int -- ^ Number of rules which were required, but were already in a valid state
    ,countBuilt :: {-# UNPACK #-} !Int -- ^ Number of rules which were have been built in this run
    ,countUnknown :: {-# UNPACK #-} !Int -- ^ Number of rules which have been built previously, but are not yet known to be required
    ,countTodo :: {-# UNPACK #-} !Int -- ^ Number of rules which are currently required (ignoring dependencies that do not change), but not built
    ,timeSkipped :: {-# UNPACK #-} !Double -- ^ Time spent building 'shakeSkipped' rules in previous runs
{'fraction_non_alphanumeric': 0.10355029585798817, 'fraction_numerical': 0.0, 'mean_word_length': 3.5519230769230767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6312941', 'n_tokens_mistral': 636, 'n_tokens_neox': 627, 'n_words': 289}