diff options
author | Joris | 2018-06-19 22:49:16 +0200 |
---|---|---|
committer | Joris | 2018-06-19 22:49:16 +0200 |
commit | 149a0470b73781022e584aaeaa7ce871d6f4173b (patch) | |
tree | c1cc762e105ae19e7f3daaa3e9279a467dbaa3dc /src/parser/haskell/Model | |
parent | 5d921c9a2b0a7a8f1a1bb5642cbefa516cbbe4cc (diff) |
Add automatic tests on remote pages
Diffstat (limited to 'src/parser/haskell/Model')
-rw-r--r-- | src/parser/haskell/Model/Ad.hs | 22 | ||||
-rw-r--r-- | src/parser/haskell/Model/URL.hs | 7 |
2 files changed, 0 insertions, 29 deletions
diff --git a/src/parser/haskell/Model/Ad.hs b/src/parser/haskell/Model/Ad.hs deleted file mode 100644 index 06906eb..0000000 --- a/src/parser/haskell/Model/Ad.hs +++ /dev/null @@ -1,22 +0,0 @@ -module Model.Ad - ( Ad(..) - , getNewAds - ) where - -import Data.List ((\\)) -import Data.Text (Text) - -import Model.URL (URL) - -data Ad = Ad - { name :: Text - , location :: Text - , price :: Maybe Text - , url :: URL - } deriving (Eq, Read, Show) - -getNewAds :: [URL] -> [Ad] -> ([URL], [Ad]) -getNewAds viewdURLs ads = - let newURLs = (map url ads) \\ viewdURLs - newAds = filter (\ad -> elem (url ad) newURLs) ads - in (newURLs, newAds) diff --git a/src/parser/haskell/Model/URL.hs b/src/parser/haskell/Model/URL.hs deleted file mode 100644 index 2114113..0000000 --- a/src/parser/haskell/Model/URL.hs +++ /dev/null @@ -1,7 +0,0 @@ -module Model.URL - ( URL - ) where - -import Data.Text - -type URL = Text |