-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
921c8dd
commit 2467359
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Main where | ||
|
||
import Data.List (isSuffixOf) | ||
import System.FilePath.Find | ||
import Test.DocTest | ||
|
||
main :: IO () | ||
-- main = find always ((extension ==? ".hs") &&? exceptFiles ["Data/Convertible/Base.hs","Data/Convertible/Utils.hs","Data/Convertible/Instances/Num.hs"]) "src" >>= doctest | ||
main = | ||
find | ||
always | ||
((extension ==? ".hs") &&? exceptFiles ["Dataset.hs", "Test.hs", "Main.hs"]) | ||
"src" >>= | ||
doctest | ||
|
||
exceptFiles :: Foldable t => t String -> FindClause Bool | ||
exceptFiles mdls | ||
-- let excludes = liftOp (\fp mdls -> not $ any (\mdl -> isSuffixOf mdl (traceShowId fp)) mdls) | ||
= | ||
let excludes = liftOp (\fp modules -> not $ any (`isSuffixOf` fp) modules) | ||
in filePath `excludes` mdls |