diff options
author | Joris Guyonvarch | 2015-04-11 19:20:04 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-04-11 19:20:04 +0200 |
commit | 4ddd6d1f6df2bab75d42b6d45b816e92e7173529 (patch) | |
tree | 09ddfd62fe32e210a87eb15eb86ee07ab9f24623 /src/Model | |
parent | 88b7f848da3515d67cfb989b98ad5285a037993e (diff) |
Fixing parsing errors, and use Text from now
Diffstat (limited to 'src/Model')
-rw-r--r-- | src/Model/Detail.hs | 4 | ||||
-rw-r--r-- | src/Model/Resume.hs | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/Model/Detail.hs b/src/Model/Detail.hs index f00a7eb..684a718 100644 --- a/src/Model/Detail.hs +++ b/src/Model/Detail.hs @@ -2,6 +2,8 @@ module Model.Detail ( Detail(..) ) where +import qualified Data.Text as T + data Detail = Detail - { description :: Maybe String + { description :: Maybe T.Text } deriving (Eq, Read, Show) diff --git a/src/Model/Resume.hs b/src/Model/Resume.hs index f4e9cd5..9d966df 100644 --- a/src/Model/Resume.hs +++ b/src/Model/Resume.hs @@ -5,20 +5,20 @@ module Model.Resume ) where import Data.List ((\\)) +import qualified Data.Text as T import Model.URL data Resume = Resume - { name :: String - , price :: Maybe String + { name :: T.Text + , price :: Maybe T.Text , url :: URL } deriving (Eq, Read, Show) -getNewResumes :: [URL] -> [Resume] -> ([URL], [Resume]) +getNewResumes :: [URL] -> [Resume] -> [Resume] getNewResumes viewdURLs resumes = let newURLs = (getURLs resumes) \\ viewdURLs - newResumes = filter (\resume -> elem (url resume) newURLs) resumes - in (viewdURLs ++ newURLs, newResumes) + in filter (\resume -> elem (url resume) newURLs) resumes getURLs :: [Resume] -> [URL] getURLs = map url |