<commit_before>{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving, DeriveDataTypeable #-}

module Development.Shake.Directory(
    doesFileExist,
    getDirectoryContents, getDirectoryFiles, getDirectoryDirs,
    defaultRuleDirectory
    ) where

import Control.Monad
import Control.Monad.IO.Class
import Data.Binary
import Data.Hashable
import Data.List
import Data.Typeable
import qualified System.Directory as IO
import System.FilePath

import Development.Shake.Core
import Development.Shake.File



newtype Exist = Exist FilePath
    deriving (Typeable,Show,Eq,Hashable,Binary)
newtype Exist_ = Exist_ Bool
    deriving (Typeable,Show,Eq,Hashable,Binary)


data GetDir
    = GetDir {dir :: FilePath}
    | GetDirFiles {dir :: FilePath, pat :: FilePattern}
    | GetDirDirs {dir :: FilePath}
    deriving (Typeable,Show,Eq)
newtype GetDir_ = GetDir_ [FilePath]
    deriving (Typeable,Show,Eq,Hashable,Binary)

instance Hashable GetDir where<commit_msg>Give a better Show instance for Exist<commit_after>{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving, DeriveDataTypeable #-}

module Development.Shake.Directory(
    doesFileExist,
    getDirectoryContents, getDirectoryFiles, getDirectoryDirs,
    defaultRuleDirectory
    ) where

import Control.Monad
import Control.Monad.IO.Class
import Data.Binary
import Data.Hashable
import Data.List
import Data.Typeable
import qualified System.Directory as IO
import System.FilePath

import Development.Shake.Core
import Development.Shake.File



newtype Exist = Exist FilePath
    deriving (Typeable,Eq,Hashable,Binary)
newtype Exist_ = Exist_ Bool
    deriving (Typeable,Show,Eq,Hashable,Binary)

instance Show Exist where
    show (Exist a) = "Exists? " ++ a


data GetDir
    = GetDir {dir :: FilePath}
    | GetDirFiles {dir :: FilePath, pat :: FilePattern}
    | GetDirDirs {dir :: FilePath}
    deriving (Typeable,Show,Eq)
newtype GetDir_ = GetDir_ [FilePath]
    deriving (Typeable,Show,Eq,Hashable,Binary)

instance Hashable GetDir where
{'fraction_non_alphanumeric': 0.08081308874566187, 'fraction_numerical': 0.0, 'mean_word_length': 5.041916167664671, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7634063', 'n_tokens_mistral': 627, 'n_tokens_neox': 619, 'n_words': 160}