diff options
Diffstat (limited to 'src/Ad.hs')
-rw-r--r-- | src/Ad.hs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/Ad.hs b/src/Ad.hs deleted file mode 100644 index 4be47f4..0000000 --- a/src/Ad.hs +++ /dev/null @@ -1,30 +0,0 @@ -module Ad - ( fetchResumes - , fetchAds - ) where - -import Data.Text (Text) -import qualified Data.Text as T - -import Page (getPage) - -import Model.Ad -import Model.Resume -import Model.Detail -import Model.URL - -import Parser.Resume -import Parser.Detail - -fetchResumes :: URL -> IO (Either Text [Resume]) -fetchResumes url = fmap parseResumes <$> getPage url - -fetchAds :: [Resume] -> IO (Either Text [Ad]) -fetchAds resumes = do - xs <- sequence $ map fetchAd resumes - return $ sequence xs - -fetchAd :: Resume -> IO (Either Text Ad) -fetchAd resume = do - page <- getPage (url resume) - fmap (\page -> Ad { resume = resume, detail = parseDetail page}) <$> getPage (url resume) |